Browse Source

feature:新增机器人艺术家

master
Penny 3 years ago
parent
commit
fb97a751c4
  1. 8
      src/api/img/creator.js
  2. 61
      src/views/img/creator/index.vue
  3. 28
      src/views/img/creatorAccount/index.vue
  4. 61
      src/views/img/tiktokImg/index.vue

8
src/api/img/creator.js

@ -72,3 +72,11 @@ export function verifyUnPass(data) {
}) })
} }
// 新增机器人艺术家
export function insertRobot() {
return request({
url: `${serviceTitle}${prefix}/insertRobot`,
method: 'get'
})
}

61
src/views/img/creator/index.vue

@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<el-row :gutter="20"> <el-row :gutter="20">
<!--用户数据--> <!--用户数据-->
<el-col :span="20" :xs="24"> <el-col :span="20" :xs="26">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="70px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="70px">
<el-form-item label="姓名" prop="name"> <el-form-item label="姓名" prop="name">
<el-input <el-input
@ -69,6 +69,16 @@
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
</el-form-item>
<el-form-item label="是否为机器人" prop="isRobot">
<el-select v-model="queryParams.isRobot" placeholder="是否为机器人" clearable>
<el-option
v-for="item in isRobot"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@ -87,6 +97,16 @@
v-hasPermi="['img:creator:add']" v-hasPermi="['img:creator:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAddRobot"
v-hasPermi="['img:creator:add']"
>新增机器人</el-button>
</el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="danger" type="danger"
@ -126,8 +146,13 @@
{{scope.row.isHot == '0' ? "否" : scope.row.isHot == '1' ? "是":''}} {{scope.row.isHot == '0' ? "否" : scope.row.isHot == '1' ? "是":''}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="序号" align="center" key="sort" prop="sort" v-if="columns[11].visible" :show-overflow-tooltip="true" /> <el-table-column label="是否为机器人" align="center" key="isRobot" prop="isRobot" v-if="columns[11].visible" width="100">
<el-table-column label="是否显示" align="center" key="isShow" v-if="columns[12].visible"> <template slot-scope="scope">
{{scope.row.isRobot == '0' ? "否" : scope.row.isRobot == '1' ? "是":''}}
</template>
</el-table-column>
<el-table-column label="序号" align="center" key="sort" prop="sort" v-if="columns[12].visible" :show-overflow-tooltip="true" />
<el-table-column label="是否显示" align="center" key="isShow" v-if="columns[13].visible">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
v-model="scope.row.isShow" v-model="scope.row.isShow"
@ -137,12 +162,12 @@
></el-switch> ></el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[13].visible" width="160"> <el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[14].visible" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="更新时间" align="center" prop="updateTime" v-if="columns[14].visible" width="160"> <el-table-column label="更新时间" align="center" prop="updateTime" v-if="columns[15].visible" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime) }}</span> <span>{{ parseTime(scope.row.updateTime) }}</span>
</template> </template>
@ -280,7 +305,7 @@
</template> </template>
<script> <script>
import { listCreator, addCreator, editCreator, delCreator, getCreatorDetails, changeStatus, verifyPass, verifyUnPass } from "@/api/img/creator"; import { listCreator, addCreator, editCreator, delCreator, getCreatorDetails, changeStatus, verifyPass, verifyUnPass, insertRobot } from "@/api/img/creator";
import { getUserProfile } from "@/api/system/user"; import { getUserProfile } from "@/api/system/user";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
@ -326,6 +351,11 @@ export default {
{ value: '0', label: '否'}, { value: '0', label: '否'},
{ value: '1', label: '是'} { value: '1', label: '是'}
], ],
//
isRobot: [
{ value: '0', label: '否'},
{ value: '1', label: '是'}
],
// //
bigImgList:[], bigImgList:[],
// //
@ -368,10 +398,11 @@ export default {
{ key: 8, label: `第三方平台账号详情地址`, visible: true }, { key: 8, label: `第三方平台账号详情地址`, visible: true },
{ key: 9, label: `状态`, visible: true }, { key: 9, label: `状态`, visible: true },
{ key: 10, label: `是否活跃`, visible: true }, { key: 10, label: `是否活跃`, visible: true },
{ key: 11, label: `序号`, visible: true }, { key: 11, label: `是否为机器人`, visible: true },
{ key: 12, label: `是否显示`, visible: true }, { key: 12, label: `序号`, visible: true },
{ key: 13, label: `创建时间`, visible: true }, { key: 13, label: `是否显示`, visible: true },
{ key: 14, label: `更新时间`, visible: true } { key: 14, label: `创建时间`, visible: true },
{ key: 15, label: `更新时间`, visible: true }
], ],
// //
rules: { rules: {
@ -464,6 +495,16 @@ export default {
this.reset(); this.reset();
this.editOpen = true; this.editOpen = true;
this.title = "新增艺术家"; this.title = "新增艺术家";
},
/** 新增机器人按钮操作 */
handleAddRobot() {
this.$modal.confirm('确定新增机器人艺术家吗?').then(function() {
return insertRobot();
}).then(() => {
this.getList();
this.$modal.msgSuccess("新增成功");
}).catch(() => {});
}, },
/** 审核按钮操作 */ /** 审核按钮操作 */
handleVerify(row){ handleVerify(row){

28
src/views/img/creatorAccount/index.vue

@ -101,7 +101,12 @@
{{scope.row.type == '0' ? "微信" : scope.row.type == '1' ? "银行卡" : scope.row.type == '2' ? "支付宝" :''}} {{scope.row.type == '0' ? "微信" : scope.row.type == '1' ? "银行卡" : scope.row.type == '2' ? "支付宝" :''}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否显示" align="center" key="isShow" v-if="columns[7].visible"> <el-table-column label="微信收款图" align="center" key="imgUrl" prop="imgUrl" v-if="columns[7].visible" width="120">
<template slot-scope="scope">
<el-image :src="scope.row.imgUrl" :preview-src-list="bigImgList" @click="getBigImg(scope.row)" style="width: 160px; height: 60px"/>
</template>
</el-table-column>
<el-table-column label="是否显示" align="center" key="isShow" v-if="columns[8].visible">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
v-model="scope.row.isShow" v-model="scope.row.isShow"
@ -111,13 +116,13 @@
></el-switch> ></el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="排序" align="center" key="sort" prop="sort" v-if="columns[8].visible"/> <el-table-column label="排序" align="center" key="sort" prop="sort" v-if="columns[9].visible"/>
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[9].visible" width="160"> <el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[10].visible" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="更新时间" align="center" prop="updateTime" v-if="columns[10].visible" width="160"> <el-table-column label="更新时间" align="center" prop="updateTime" v-if="columns[11].visible" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime) }}</span> <span>{{ parseTime(scope.row.updateTime) }}</span>
</template> </template>
@ -237,6 +242,8 @@ export default {
open: false, open: false,
// //
form: {}, form: {},
//
bigImgList:[],
// //
isShow: [ isShow: [
{ value: '0', label: '否'}, { value: '0', label: '否'},
@ -268,10 +275,11 @@ export default {
{ key: 4, label: `账户账号`, visible: true }, { key: 4, label: `账户账号`, visible: true },
{ key: 5, label: `联系方式`, visible: true }, { key: 5, label: `联系方式`, visible: true },
{ key: 6, label: `类型`, visible: true }, { key: 6, label: `类型`, visible: true },
{ key: 7, label: `是否显示`, visible: true }, { key: 7, label: `微信收款图`, visible: true },
{ key: 8, label: `排序`, visible: true }, { key: 8, label: `是否显示`, visible: true },
{ key: 9, label: `创建时间`, visible: true }, { key: 9, label: `排序`, visible: true },
{ key: 10, label: `更新时间`, visible: true } { key: 10, label: `创建时间`, visible: true },
{ key: 11, label: `更新时间`, visible: true }
], ],
// //
rules: { rules: {
@ -354,6 +362,10 @@ export default {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },
/** 查看大图 */
getBigImg(row){
this.bigImgList.push(row.imgUrl)
},
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id); this.ids = selection.map(item => item.id);

61
src/views/img/tiktokImg/index.vue

@ -51,6 +51,16 @@
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
/> />
</el-select>
</el-form-item>
<el-form-item label="是否原创" prop="isOriginal" label-width="80px">
<el-select v-model="queryParams.isOriginal" placeholder="是否原创" clearable>
<el-option
v-for="item in isOriginal"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -116,7 +126,12 @@
{{scope.row.status == '0' ? "待审核" : scope.row.status == '1' ? "审核拒绝": scope.row.status == '2' ? "已上架": scope.row.status == '3' ? "已下架" : ''}} {{scope.row.status == '0' ? "待审核" : scope.row.status == '1' ? "审核拒绝": scope.row.status == '2' ? "已上架": scope.row.status == '3' ? "已下架" : ''}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否热门" align="center" key="isHot" prop="isHot" v-if="columns[9].visible"> <el-table-column label="原创状态" align="center" key="isOriginal" prop="isOriginal" v-if="columns[9].visible" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{scope.row.isOriginal == '0' ? "网络图片" : scope.row.isOriginal == '1' ? "原创图片": ''}}
</template>
</el-table-column>
<el-table-column label="是否热门" align="center" key="isHot" prop="isHot" v-if="columns[10].visible">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
v-model="scope.row.isHot" v-model="scope.row.isHot"
@ -126,8 +141,8 @@
></el-switch> ></el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="序号" align="center" key="sort" prop="sort" v-if="columns[10].visible"/> <el-table-column label="序号" align="center" key="sort" prop="sort" v-if="columns[11].visible"/>
<el-table-column label="是否显示" align="center" key="isShow" v-if="columns[11].visible"> <el-table-column label="是否显示" align="center" key="isShow" v-if="columns[12].visible">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
v-model="scope.row.isShow" v-model="scope.row.isShow"
@ -137,12 +152,12 @@
></el-switch> ></el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[12].visible" width="160"> <el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[13].visible" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="更新时间" align="center" prop="updateTime" v-if="columns[13].visible" width="160"> <el-table-column label="更新时间" align="center" prop="updateTime" v-if="columns[14].visible" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime) }}</span> <span>{{ parseTime(scope.row.updateTime) }}</span>
</template> </template>
@ -211,6 +226,20 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="原创状态" prop="isOriginal" >
<el-select v-model="form.isOriginal" placeholder="原创状态" clearable>
<el-option
v-for="item in isOriginal"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
</el-col> </el-col>
<el-col :span="15"> <el-col :span="15">
<el-form-item label="图片地址" prop="imgUrl"> <el-form-item label="图片地址" prop="imgUrl">
@ -304,6 +333,11 @@ export default {
{ value: '0', label: ``}, { value: '0', label: ``},
{ value: '1', label: ``} { value: '1', label: ``}
], ],
//
isOriginal: [
{ value: '0', label: `网络图片`},
{ value: '1', label: `原创图片`}
],
// //
form: {}, form: {},
// //
@ -327,7 +361,8 @@ export default {
typeId: undefined, typeId: undefined,
status: undefined, status: undefined,
isHot: undefined, isHot: undefined,
isShow: undefined isShow: undefined,
isOriginal: undefined
}, },
// //
columns: [ columns: [
@ -340,11 +375,12 @@ export default {
{ key: 6, label: `收藏量`, visible: true }, { key: 6, label: `收藏量`, visible: true },
{ key: 7, label: `是否审核`, visible: true }, { key: 7, label: `是否审核`, visible: true },
{ key: 8, label: `图片状态`, visible: true }, { key: 8, label: `图片状态`, visible: true },
{ key: 9, label: `是否热门`, visible: true }, { key: 9, label: `原创状态`, visible: true },
{ key: 10, label: `序号`, visible: true }, { key: 10, label: `是否热门`, visible: true },
{ key: 11, label: `是否显示`, visible: true }, { key: 11, label: `序号`, visible: true },
{ key: 12, label: `创建时间`, visible: true }, { key: 12, label: `是否显示`, visible: true },
{ key: 13, label: `更新时间`, visible: true } { key: 13, label: `创建时间`, visible: true },
{ key: 14, label: `更新时间`, visible: true }
], ],
// //
rules: { rules: {
@ -356,6 +392,9 @@ export default {
], ],
typeId: [ typeId: [
{ required: true, message: "分类不能为空", trigger: "blur" } { required: true, message: "分类不能为空", trigger: "blur" }
],
isOriginal: [
{ required: true, message: "原装状态不能为空", trigger: "blur" }
] ]
} }
}; };

Loading…
Cancel
Save