Browse Source

feature-img-1.0:新增邀请记录、审核记录

master
chengkun 4 years ago
parent
commit
d1af371d5f
  1. 45
      src/api/img/creatorProfit.js
  2. 20
      src/api/img/inviteLog.js
  3. 20
      src/api/img/verifyLog.js
  4. 404
      src/views/img/creatorProfit/index.vue
  5. 198
      src/views/img/inviteLog/index.vue
  6. 192
      src/views/img/verifyLog/index.vue

45
src/api/img/creatorProfit.js

@ -0,0 +1,45 @@
import request from '@/utils/request'
// 查询艺术家收益分页列表
export function listCreatorProfit(data) {
return request({
url: '/img/img/creatorProfit/page',
method: 'post',
data: data
})
}
// 修改艺术家收益
export function editCreatorProfit(data) {
return request({
url: '/img/img/creatorProfit/update',
method: 'post' ,
data: data
})
}
// 删除艺术家收益
export function delCreatorProfit(ids) {
return request({
url: '/img/img/creatorProfit/delete/' + ids,
method: 'delete'
})
}
// 获取艺术家收益详情
export function getCreatorProfitDetails(id) {
return request({
url: '/img/img/creatorProfit/details/' + id,
method: 'get'
})
}
// 变更类型显示状态
export function changeStatus(data) {
return request({
url: '/img/img/creatorProfit/changeStatus',
method: 'post' ,
data: data
})
}

20
src/api/img/inviteLog.js

@ -0,0 +1,20 @@
import request from '@/utils/request'
// 查询邀请记录分页列表
export function listInviteLog(data) {
return request({
url: '/img/img/inviteLog/page',
method: 'post',
data: data
})
}
// 删除邀请记录
export function delInviteLog(ids) {
return request({
url: '/img/img/inviteLog/delete/' + ids,
method: 'delete'
})
}

20
src/api/img/verifyLog.js

@ -0,0 +1,20 @@
import request from '@/utils/request'
// 查询审核记录分页列表
export function listVerifyLog(data) {
return request({
url: '/img/img/verifyLog/page',
method: 'post',
data: data
})
}
// 删除审核记录
export function delVerifyLog(ids) {
return request({
url: '/img/img/verifyLog/delete/' + ids,
method: 'delete'
})
}

404
src/views/img/creatorProfit/index.vue

@ -0,0 +1,404 @@
<template>
<div class="app-container">
<el-row :gutter="20">
<!--banner数据-->
<el-col :span="20" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="结算流水号" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
placeholder="请输入流水号"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="搜索码" prop="scanCode">
<el-input
v-model="queryParams.scanCode"
placeholder="请输入搜索码"
clearable
style="width: 200px"
/>
</el-form-item>
<el-form-item label="来源平台" prop="source" label-width="80px">
<el-select v-model="queryParams.source" placeholder="来源渠道" clearable>
<el-option
v-for="item in source"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="是否显示" prop="isShow" label-width="80px">
<el-select v-model="queryParams.isShow" placeholder="是否显示" clearable>
<el-option
v-for="item in isShow"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['img:banner:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['img:banner:remove']"
>删除</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="creatorProfitList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="编号" align="center" key="id" prop="id" v-if="columns[0].visible" />
<el-table-column label="banner名称" align="center" key="bannerName" prop="bannerName" v-if="columns[1].visible" :show-overflow-tooltip="true" width="150"/>
<el-table-column label="跳转地址" align="center" key="bannerUrl" prop="bannerUrl" v-if="columns[2].visible" :show-overflow-tooltip="true" />
<el-table-column label="来源平台" align="center" key="source" prop="source" v-if="columns[3].visible">
<template slot-scope="scope">
{{scope.row.source == '0' ? "通用" : scope.row.source == '1' ? "抖音": scope.row.source == '2' ? "快手": scope.row.source == '3' ? "微信": ''}}
</template>
</el-table-column>
<el-table-column label="banner图片" align="center" key="bannerImg" prop="bannerImg" v-if="columns[4].visible" width="120">
<template slot-scope="scope">
<el-image :src="scope.row.bannerImg" :preview-src-list="bigImgList" @click="getBigImg(scope.row)" style="width: 160px; height: 60px"/>
</template>
</el-table-column>
<el-table-column label="序号" align="center" key="sort" prop="sort" v-if="columns[5].visible"/>
<el-table-column label="是否显示" align="center" key="isShow" v-if="columns[6].visible">
<template slot-scope="scope">
<el-switch
v-model="scope.row.isShow"
active-value="1"
inactive-value="0"
@change="handleStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[7].visible" width="160">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="更新时间" align="center" prop="updateTime" v-if="columns[8].visible" width="160">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime) }}</span>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
width="160"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['img:banner:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['img:banner:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<!-- 添加或修改banner对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="12">
<el-form-item label="banner名称" prop="bannerName">
<el-input v-model="form.bannerName" placeholder="请输入banner名称" maxlength="30" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="跳转地址" prop="bannerUrl">
<el-input v-model="form.bannerUrl" placeholder="请输入跳转地址" maxlength="100" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="来源平台" prop="source" label-width="80px">
<el-select v-model="form.source" placeholder="来源平台" clearable>
<el-option
v-for="item in source"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listCreatorProfit,editCreatorProfit,delCreatorProfit,getCreatorProfitDetails,changeStatus } from "@/api/img/creatorProfit";
import { getToken } from "@/utils/auth";
export default {
name: "Banner",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// banner
bannerList: null,
//
title: "",
//
open: false,
//
dateRange: [],
//
fileList:[],
//
bigImgList:[],
//
source: [
{ value:'0',label:'通用'},
{ value:'1',label:'抖音'},
{ value:'2',label:'快手'},
{ value:'3',label:'微信'},
],
//
isShow: [
{ value: '0', label: ``},
{ value: '1', label: ``}
],
//
form: {},
defaultProps: {
children: "children",
label: "label"
},
//
upload: {
//
open: false,
//
title: "",
//
isUploading: false,
//
headers: { Authorization: "Bearer " + getToken() },
//
url: process.env.VUE_APP_BASE_API + "/file/uploadBanner" //http://localhost:7010/file/upload
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
bannerName: undefined,
source: undefined,
isShow: undefined
},
//
columns: [
{ key: 0, label: `编号`, visible: true },
{ key: 1, label: `banner名称`, visible: true },
{ key: 2, label: `跳转地址`, visible: true },
{ key: 3, label: `来源平台`, visible: true },
{ key: 4, label: `banner图片`, visible: true },
{ key: 5, label: `序号`, visible: true },
{ key: 6, label: `是否显示`, visible: true },
{ key: 7, label: `创建时间`, visible: true },
{ key: 8, label: `更新时间`, visible: true }
],
//
rules: {
bannerName: [
{ required: true, message: "banner名称不能为空", trigger: "blur" },
{ min: 2, max: 20, message: 'banner名称长度必须介于 2 和 20 之间', trigger: 'blur' }
],
bannerUrl: [
{ required: true, message: "bannerUrl不能为空", trigger: "blur" },
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询banner列表 */
getList() {
this.loading = true;
listCreatorProfit(this.queryParams).then(response => {
this.creatorProfitList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
//
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
//
handleStatusChange(row) {
let text = row.isShow === "1" ? "启用" : "停用";
this.$modal.confirm('确认要' + text + 'id为' + row.id + '的banner吗?').then(function() {
let data = {
id: row.id,
status: row.isShow
}
return changeStatus(data);
}).then(() => {
this.$modal.msgSuccess(text + "成功");
}).catch(function() {
row.isShow = row.isShow === "0" ? "1" : "0";
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
bannerName: undefined,
bannerUrl: undefined,
bannerImg: undefined,
source: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
/** 查看大图 */
getBigImg(row){
this.bigImgList.push(row.bannerImg)
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加banner";
this.fileList = []
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getCreatorProfitDetails(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改艺术家收益";
this.fileList = []
});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != undefined) {
editCreatorProfit(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id || this.ids;
this.$modal.confirm('是否确认删除编号为"' + id + '"的艺术家收益吗?').then(function() {
return delCreatorProfit(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
//
handleFileSuccess(response, file, fileList) {
this.form.bannerImg = response.data
this.fileList.url = response.data
this.fileList.name = '图片上传结果'
this.upload.open = false;
this.upload.isUploading = false;
//this.$refs.upload.clearFiles();
//this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.data + "</div>", "", { dangerouslyUseHTMLString: true });
//this.getList();
}
}
};
</script>

198
src/views/img/inviteLog/index.vue

@ -0,0 +1,198 @@
<template>
<div class="app-container">
<el-row :gutter="20">
<!--类型搜索数据-->
<el-col :span="20" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="邀请码" prop="inviteCode">
<el-input
v-model="queryParams.inviteCode"
placeholder="请输入邀请码"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="是否显示" prop="isShow">
<el-select v-model="queryParams.isShow" placeholder="是否显示" clearable>
<el-option
v-for="item in isShow"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['img:inviteLog:remove']"
>删除</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="inviteLogList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="编号" align="center" key="id" prop="id" v-if="columns[0].visible" />
<el-table-column label="邀请码" align="center" key="inviteCode" prop="inviteCode" v-if="columns[1].visible" />
<el-table-column label="邀请者id" align="center" key="creatorId" prop="creatorId" v-if="columns[2].visible" />
<el-table-column label="被邀请者id" align="center" key="invitedCreatorId" prop="invitedCreatorId" v-if="columns[3].visible" width="120"/>
<el-table-column label="是否显示" align="center" key="isShow" v-if="columns[4].visible">
<template slot-scope="scope">
{{scope.row.isShow == '0' ? "隐藏" : scope.row.isShow == '1' ? "显示": ''}}
</template>
</el-table-column>
<el-table-column label="排序" align="center" key="sort" prop="sort" v-if="columns[5].visible"/>
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[6].visible" width="160">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="更新时间" align="center" prop="updateTime" v-if="columns[7].visible" width="160">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime) }}</span>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
width="160"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['img:inviteLog:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
</div>
</template>
<script>
import { listInviteLog, delInviteLog } from "@/api/img/inviteLog";
export default {
name: "Type",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
inviteLog: null,
//
isShow: [
{ value: '0', label: '否'},
{ value: '1', label: '是'}
],
//
queryParams: {
pageNum: 1,
pageSize: 10,
inviteCode: undefined,
isShow: undefined
},
//
columns: [
{ key: 0, label: `编号`, visible: true },
{ key: 1, label: `邀请码`, visible: true },
{ key: 2, label: `邀请者id`, visible: true },
{ key: 3, label: `被邀请者id`, visible: true },
{ key: 4, label: `是否显示`, visible: true },
{ key: 5, label: `排序`, visible: true },
{ key: 6, label: `创建时间`, visible: true },
{ key: 7, label: `更新时间`, visible: true }
]
};
},
created() {
this.getList();
},
methods: {
/** 查询类型列表 */
getList() {
this.loading = true;
listInviteLog(this.queryParams).then(response => {
this.inviteLogList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
//
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
//
handleNodeClick(data) {
this.queryParams.deptId = data.id;
this.handleQuery();
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除类型编号为"' + ids + '"的数据项?').then(function() {
return delInviteLog(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
}
};
</script>

192
src/views/img/verifyLog/index.vue

@ -0,0 +1,192 @@
<template>
<div class="app-container">
<el-row :gutter="20">
<!--类型搜索数据-->
<el-col :span="20" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="审核状态" prop="status">
<el-select v-model="queryParams.status" placeholder="审核状态" clearable>
<el-option
v-for="item in status"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['img:verifyLog:remove']"
>删除</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="verifyLogList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="编号" align="center" key="id" prop="id" v-if="columns[0].visible" />
<el-table-column label="艺术家id" align="center" key="creatorId" prop="creatorId" v-if="columns[1].visible" />
<el-table-column label="管理员id" align="center" key="adminId" prop="adminId" v-if="columns[2].visible" width="120"/>
<el-table-column label="原因" align="center" key="reason" prop="reason" v-if="columns[3].visible" />
<el-table-column label="审核状态" align="center" key="status" v-if="columns[4].visible">
<template slot-scope="scope">
{{scope.row.status == '0' ? "不通过" : scope.row.status == '1' ? "通过": ''}}
</template>
</el-table-column>
<el-table-column label="是否显示" align="center" key="isShow" v-if="columns[5].visible">
<template slot-scope="scope">
{{scope.row.isShow == '0' ? "隐藏" : scope.row.isShow == '1' ? "显示": ''}}
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[6].visible" width="160">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="更新时间" align="center" prop="updateTime" v-if="columns[7].visible" width="160">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime) }}</span>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
width="160"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['img:verifyLog:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
</div>
</template>
<script>
import { listVerifyLog, delVerifyLog } from "@/api/img/verifyLog";
export default {
name: "Type",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
verifyLog: null,
//
status: [
{ value: '0', label: '不通过'},
{ value: '1', label: '通过'}
],
//
queryParams: {
pageNum: 1,
pageSize: 10,
status: undefined
},
//
columns: [
{ key: 0, label: `编号`, visible: true },
{ key: 1, label: `艺术家id`, visible: true },
{ key: 2, label: `管理员id`, visible: true },
{ key: 3, label: `原因`, visible: true },
{ key: 4, label: `审核状态`, visible: true },
{ key: 5, label: `是否显示`, visible: true },
{ key: 6, label: `创建时间`, visible: true },
{ key: 7, label: `更新时间`, visible: true }
]
};
},
created() {
this.getList();
},
methods: {
/** 查询类型列表 */
getList() {
this.loading = true;
listVerifyLog(this.queryParams).then(response => {
this.verifyLogList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
//
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
//
handleNodeClick(data) {
this.queryParams.deptId = data.id;
this.handleQuery();
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除类型编号为"' + ids + '"的数据项?').then(function() {
return delVerifyLog(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
}
};
</script>
Loading…
Cancel
Save