Merge branch 'main' of git.zdool.com:xs/yyx/web

This commit is contained in:
lnn19986213 2024-02-02 15:09:21 +08:00
commit 7d0dcd0f5c
6 changed files with 1246 additions and 14 deletions

View File

@ -24,7 +24,7 @@
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column> <el-table-column type="selection" width="55"></el-table-column>
<el-table-column type="index" label="序号" width="80"> </el-table-column> <el-table-column type="index" label="序号" width="80"> </el-table-column>
<el-table-column prop="name" label="标题"> </el-table-column> <el-table-column prop="name" label="标题" show-overflow-tooltip> </el-table-column>
<el-table-column prop="cover" label="封面图片" width="280"> <el-table-column prop="cover" label="封面图片" width="280">
<template #default="scope"> <template #default="scope">
<el-image :src="scope.row.cover"></el-image> <el-image :src="scope.row.cover"></el-image>

View File

@ -0,0 +1,421 @@
<template>
<el-header>
<div style="display: flex">
<div style="margin-left: 10px">
<el-input
v-model="value1"
placeholder="请输入商品名"
:input-style="inputStyle"
clearable
></el-input>
</div>
<div style="margin-left: 10px">
<el-select v-model="selectValue" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div style="margin-left: 10px">
<div>
<el-button type="primary" icon="el-icon-search" @click="getData"
>搜索</el-button
>
</div>
</div>
<div style="margin-left: 10px">
<div>
<el-button
type="primary"
icon="el-icon-search"
@click="getdetail('批量审核', ids)"
>批量审核</el-button
>
</div>
</div>
</div>
</el-header>
<div class="scTable" ref="scTableMain" v-loading="loading">
<div class="scTable-table">
<el-table
:data="tableData"
style="width: 100%"
ref="scTable"
:height="tableHeight"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column type="index" label="序号" width="80">
</el-table-column>
<el-table-column prop="goodsName" label="商品" show-overflow-tooltip>
</el-table-column>
<!-- <el-table-column prop="introduce" label="简介"> </el-table-column> -->
<el-table-column prop="shopInfo.userName" label="发布者">
</el-table-column>
<!-- <el-table-column prop="workTag" label="标签"> </el-table-column> -->
<el-table-column prop="typeName" label="类型">
<template #default="scope">
<span>{{ scope.row.typeName }} - {{ scope.row.typesName }}</span>
</template>
</el-table-column>
<el-table-column prop="examineState" label="审核状态">
<template #default="scope">
<span v-if="scope.row.examineState == '0'" style="color: #409eff"
>未审核</span
>
<span
v-else-if="scope.row.examineState == '1'"
style="color: #67c23a"
>通过</span
>
<span
v-else-if="scope.row.examineState == '2'"
style="color: #f56c6c"
>拒绝</span
>
</template>
</el-table-column>
<el-table-column prop="examineUser" label="审核人">
<template #default="scope">
<span v-if="scope.row.examineUser">{{
scope.row.examineUser
}}</span>
<span v-else>暂无</span>
</template>
</el-table-column>
<el-table-column prop="examineDate" label="审核时间">
<template #default="scope">
<span v-if="scope.row.examineDate">{{
scope.row.examineDate
}}</span>
<span v-else>暂无</span>
</template>
</el-table-column>
<el-table-column label="操作" width="100">
<template #default="scope">
<span
style="
font-size: 14px;
color: #409eff;
margin-right: 10px;
cursor: pointer;
"
@click.stop="getdetail('审核', scope.row.id)"
v-if="scope.row.examineState == '0'"
>审核</span
>
<span
style="
font-size: 14px;
color: #409eff;
margin-right: 10px;
cursor: pointer;
"
@click.stop="getdetails('详情', scope.row)"
>详情</span
>
</template>
</el-table-column>
</el-table>
</div>
<div class="scTable-page">
<div class="scTable-pagination">
<el-pagination
background
:small="true"
layout="total, prev, pager, next, jumper"
:total="total"
:page-size="pageSize"
v-model:currentPage="currentPage"
@current-change="paginationChange"
></el-pagination>
</div>
<div class="scTable-do">
<el-button
@click="refresh"
icon="el-icon-refresh"
circle
style="margin-left: 15px"
></el-button>
</div>
</div>
</div>
<el-dialog
v-model="open"
:title="title"
destroy-on-close
:before-close="before"
width="50%"
>
<el-form :model="formState" label-width="100px">
<el-form-item label="状态" name="userName">
<el-radio-group v-model="formState.resource">
<el-radio :label="true">通过</el-radio>
<el-radio :label="false">不通过</el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item label="简介" name="artAtt">
<el-input type="textarea" v-model="formState.desc"></el-input>
</el-form-item> -->
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="handleClose">取消</el-button>
<el-button type="primary" @click="onFinish()"> 确定 </el-button>
</span>
</template>
</el-dialog>
<el-dialog
v-model="opens"
:title="title"
destroy-on-close
:before-close="before"
width="50%"
>
<el-form :model="detailForm" label-width="100px">
<el-form-item label="商品名称">
<el-input v-model="detailForm.goodsName"></el-input>
</el-form-item>
<el-form-item label="发布者">
<el-input v-model="detailForm.userName"></el-input>
</el-form-item>
<!-- <el-form-item label="简介">
<el-input type="textarea" v-model="detailForm.introduce"></el-input>
</el-form-item> -->
<el-form-item label="网盘地址">
<el-input v-model="detailForm.wpPath"></el-input>
</el-form-item>
<el-form-item label="提取码">
<el-input v-model="detailForm.code"></el-input>
</el-form-item>
<el-form-item label="文件">
<sc-upload-multiple :accept="''" v-model="imgList"></sc-upload-multiple>
<!-- <div v-for="(v,i) in imgList" :key="i">
<a :href="v" target="_blank">{{ v }}</a>
</div> -->
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="handleCloses">取消</el-button>
<el-button type="primary" @click="handleCloses"> 确定 </el-button>
</span>
</template>
</el-dialog>
</template>
<script>
import http from "@/utils/request";
import { defineAsyncComponent } from "vue";
const scEditor = defineAsyncComponent(() => import("@/components/scEditor"));
export default {
components: {
scEditor,
},
data() {
return {
inputStyle: {
paddingRight: "30px",
},
tableData: [],
pageSize: 20,
total: 0,
currentPage: 1,
loading: false,
tableHeight: "100%",
paginationLayout: "total, prev, pager, next, jumper",
value1: "",
open: false,
opens: false,
title: "修改",
formState: {
resource: true,
desc: "",
},
detailForm: {},
imgList: [],
multipleSelection: [],
ids: "",
selectValue: "",
options: [
{
value: "",
label: "全部",
},
{
value: "1",
label: "已通过",
},
{
value: "2",
label: "未通过",
},
{
value: "0",
label: "未审核",
},
],
};
},
created() {
this.$nextTick(() => {
this.upTableHeight();
});
},
mounted() {
this.getData();
},
methods: {
//
upTableHeight() {
this.tableHeight = this.$refs.scTableMain.offsetHeight - 50 + "px";
},
handleSelectionChange(val) {
this.multipleSelection = val;
let arr = [];
this.multipleSelection.forEach((item) => {
arr.push(item.id);
});
this.ids = arr.join(",");
},
//
getData() {
let parame = {
typesOf: "3",
examineState: this.selectValue,
title: this.value1,
page: this.currentPage,
size: this.pageSize,
};
http
.get("/api/goods/examineList", parame)
.then((res) => {
if (res.code == 200) {
this.tableData = res.data.records;
this.total = res.data.total;
this.currentPage = res.data.current;
this.loading = false;
}
})
.catch((err) => {
console.log(err);
this.loading = false;
});
},
//
paginationChange() {
this.getData();
},
//
refresh() {
this.$refs.scTable.clearSelection();
this.loading = true;
this.getData();
},
before() {
this.open = false;
this.opens = false;
// router.replace();
},
handleClose() {
this.open = false;
this.formState.desc = "";
this.formState.resource = true;
},
onFinish() {
// let parame = {
// ids: this.ids,
// examineState: this.formState.resource
// }
http
.post(
"/api/goods/examine?examineState=" +
this.formState.resource +
"&ids=" +
this.ids
)
.then((res) => {
if (res.code == 200) {
this.tableData = [];
this.total = 0;
this.currentPage = 1;
this.loading = true;
this.open = false;
this.getData();
}
})
.catch((err) => {
console.log(err);
});
},
onFinishs() {
this.opens = false;
},
getdetail(title, value) {
this.title = title;
this.open = true;
this.ids = value;
},
getdetails(title, value) {
this.imgList = [];
this.title = title;
this.opens = true;
// this.detailForm.goodsName = value.goodsName;
// this.detailForm.userName = value.shopInfo.userName;
// this.detailForm.wpPath = value.panUrl;
// this.detailForm.code = value.panCode;
this.detailForm.name = value.goodsName;
this.detailForm.wpPath = value.domainInfo.wpPath;
this.detailForm.code = value.domainInfo.code;
this.detailForm.userName = value.shopInfo.userName;
// this.detailForm.introduce = value.domainInfo.introduce;
let img1 = null;
if (value.domainInfo.file) {
img1 = value.domainInfo.file.split(",");
if (img1.length > 0) {
img1.forEach((ele) => {
this.imgList.push({
path: ele,
preview: ele,
});
});
}
}
},
handleCloses() {
this.opens = false;
this.detailForm = {};
this.imgList = [];
},
},
};
</script>
<style scoped>
.scTable {
display: flex;
flex-direction: column;
height: calc(100% - 60px);
}
.scTable-table {
flex: 1;
}
.scTable-page {
height: 50px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 15px;
background-color: #fff;
}
.scTable-do {
white-space: nowrap;
}
</style>

396
src/views/examine/jfsp.vue Normal file
View File

@ -0,0 +1,396 @@
<template>
<el-header>
<div style="display: flex">
<div style="margin-left: 10px">
<el-input
v-model="value1"
placeholder="积分商品名"
:input-style="inputStyle"
clearable
></el-input>
</div>
<div style="margin-left: 10px">
<el-select v-model="state" placeholder="状态" clearable>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div style="margin-left: 10px">
<el-select v-model="selectValue" placeholder="审核状态" clearable>
<el-option
v-for="item in options2"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div style="margin-left: 10px">
<div>
<el-button type="primary" icon="el-icon-search" @click="getData"
>搜索</el-button
>
</div>
</div>
</div>
</el-header>
<div class="scTable" ref="scTableMain" v-loading="loading">
<div class="scTable-table">
<el-table
:data="tableData"
style="width: 100%"
ref="scTable"
:height="tableHeight"
@selection-change="handleSelectionChange"
stripe
>
<el-table-column type="index" label="序号" width="80">
</el-table-column>
<el-table-column prop="goodsName" label="商品名" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="pointPrice" label="积分价格"> </el-table-column>
<el-table-column prop="moneyPrice" label="金钱价格"> </el-table-column>
<el-table-column prop="authorName" label="发布人"> </el-table-column>
<el-table-column prop="state" label="状态"> </el-table-column>
<!-- <el-table-column prop="typeName" label="类型">
<template #default="scope">
<span>{{ scope.row.typeName }} - {{ scope.row.typesName }}</span>
</template>
</el-table-column> -->
<el-table-column prop="examineState" label="审核状态">
<!-- <template #default="scope">
<span v-if="scope.row.examineState == '0'" style="color: #409eff"
>未审核</span
>
<span
v-else-if="scope.row.examineState == '1'"
style="color: #67c23a"
>通过</span
>
<span
v-else-if="scope.row.examineState == '2'"
style="color: #f56c6c"
>拒绝</span
>
</template> -->
</el-table-column>
<el-table-column label="操作" width="150">
<template #default="scope">
<span
style="
font-size: 12px;
color: #409eff;
margin-right: 10px;
cursor: pointer;
"
@click.stop="getdetails('查看商品', scope.row)"
>查看</span
>
<span
style="
font-size: 12px;
color: #409eff;
margin-right: 10px;
cursor: pointer;
"
@click.stop="getdetails('修改商品', scope.row)"
>编辑</span
>
<el-popconfirm title="确定删除吗?" @confirm="del(scope.row.id)">
<template #reference>
<span
style="
font-size: 12px;
color: #409eff;
margin-right: 10px;
cursor: pointer;
"
>
删除
</span>
</template>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</div>
<div class="scTable-page">
<div class="scTable-pagination">
<el-pagination
background
:small="true"
layout="total, prev, pager, next, jumper"
:total="total"
:page-size="pageSize"
v-model:currentPage="currentPage"
@current-change="paginationChange"
></el-pagination>
</div>
<div class="scTable-do">
<el-button
@click="refresh"
icon="el-icon-refresh"
circle
style="margin-left: 15px"
></el-button>
</div>
</div>
</div>
<el-dialog
v-model="opens"
:title="title"
destroy-on-close
:before-close="before"
width="35%"
>
<el-form :model="detailForm" label-width="100px">
<el-form-item
label="商品名"
:rules="[
{
required: true,
trigger: 'blur',
message: `请输入商品名`,
},
]"
>
<el-input v-model="detailForm.goodsName"></el-input>
</el-form-item>
<el-form-item label="积分价格">
<el-input v-model="detailForm.pointPrice"></el-input>
</el-form-item>
<el-form-item label="金钱价格">
<el-input v-model="detailForm.moneyPrice"></el-input>
</el-form-item>
<el-form-item label="发布人">
<el-input v-model="detailForm.authorName"></el-input>
</el-form-item>
<el-form-item
label="状态"
:rules="[
{
required: true,
trigger: 'blur',
message: `请选择状态`,
},
]"
>
<el-select v-model="detailForm.state" placeholder="状态">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="handleCloses">取消</el-button>
<el-button type="primary" @click="fix()" v-show="title == '编辑'">
确定
</el-button>
</span>
</template>
</el-dialog>
</template>
<script>
import http from "@/utils/request";
import { defineAsyncComponent } from "vue";
const scEditor = defineAsyncComponent(() => import("@/components/scEditor"));
export default {
components: {
scEditor,
},
data() {
return {
inputStyle: {
paddingRight: "30px",
},
tableData: [],
pageSize: 20,
total: 0,
currentPage: 1,
loading: false,
tableHeight: "100%",
paginationLayout: "total, prev, pager, next, jumper",
value1: "",
open: false,
opens: false,
title: "修改",
formState: {
resource: true,
desc: "",
},
detailForm: {},
imgList: [],
multipleSelection: [],
ids: "",
selectValue: "",
state: "",
options: [
{
value: "2",
label: "下架",
},
{
value: "1",
label: "上架",
},
],
options2: [
{
value: "1",
label: "通过",
},
{
value: "2",
label: "驳回",
},
{
value: "0",
label: "待审核",
},
],
};
},
created() {
this.$nextTick(() => {
this.upTableHeight();
});
},
mounted() {
this.getData();
},
methods: {
//
upTableHeight() {
this.tableHeight = this.$refs.scTableMain.offsetHeight - 50 + "px";
},
handleSelectionChange(val) {
this.multipleSelection = val;
let arr = [];
this.multipleSelection.forEach((item) => {
arr.push(item.id);
});
this.ids = arr.join(",");
},
//
getData() {
let parame = {
state: this.state,
examineState: this.selectValue,
goodsName: this.value1,
page: this.currentPage,
size: this.pageSize,
};
http
.get("/api/goods/pointGoodsList", parame)
.then((res) => {
if (res.code == 200) {
this.tableData = res.data.records;
this.total = res.data.total;
this.currentPage = res.data.current;
this.loading = false;
}
})
.catch((err) => {
console.log(err);
this.loading = false;
});
},
//
paginationChange() {
this.getData();
},
//
refresh() {
this.$refs.scTable.clearSelection();
this.loading = true;
this.getData();
},
before() {
this.opens = false;
// router.replace();
},
del(id) {
console.log("删除", id);
http
.post(`/api/goods/delete/${id}`)
.then((res) => {
if (res.code == 200) {
console.log("删除成功");
}
})
.catch((err) => {
console.log(err);
});
},
getdetails(title, value) {
this.title = title;
this.opens = true;
this.detailForm = value;
if (value.state == "上架") {
this.detailForm.state = "1";
} else {
this.detailForm.state = "0";
}
},
fix() {
let goods = this.detailForm;
http
.post("/api/goods/edit", goods)
.then((res) => {
if (res.code == 200) {
this.opens = false;
this.loading = true;
this.getData();
this.detailForm = {};
}
})
.catch((err) => {
console.log(err);
// this.loading = false;
});
},
handleCloses() {
this.opens = false;
this.detailForm = {};
},
},
};
</script>
<style scoped>
.scTable {
display: flex;
flex-direction: column;
height: calc(100% - 60px);
}
.scTable-table {
flex: 1;
}
.scTable-page {
height: 50px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 15px;
background-color: #fff;
}
.scTable-do {
white-space: nowrap;
}
</style>

View File

@ -24,13 +24,13 @@
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column> <el-table-column type="selection" width="55"></el-table-column>
<el-table-column type="index" label="序号" width="80"> </el-table-column> <el-table-column type="index" label="序号" width="80"> </el-table-column>
<el-table-column prop="title" label="标题"> </el-table-column> <el-table-column prop="title" label="标题" show-overflow-tooltip> </el-table-column>
<el-table-column prop="content" label="简介"> </el-table-column> <!-- <el-table-column prop="content" label="简介"> </el-table-column> -->
<el-table-column prop="cover" label="封面图片" width="280"> <!-- <el-table-column prop="cover" label="封面图片" width="280">
<template #default="scope"> <template #default="scope">
<el-image :src="scope.row.cover"></el-image> <el-image :src="scope.row.cover"></el-image>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column prop="examineState" label="审核状态"> <el-table-column prop="examineState" label="审核状态">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.examineState == '0'" style="color:#409EFF;">未审核</span> <span v-if="scope.row.examineState == '0'" style="color:#409EFF;">未审核</span>
@ -122,7 +122,7 @@
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="handleCloses">取消</el-button> <el-button @click="handleCloses">取消</el-button>
<el-button type="primary" @click="onFinish()"> <el-button type="primary" @click="handleCloses">
确定 确定
</el-button> </el-button>
</span> </span>

View File

@ -0,0 +1,414 @@
<template>
<el-header>
<div style="display: flex">
<div style="margin-left: 10px">
<el-input
v-model="value1"
placeholder="请输入标题"
:input-style="inputStyle"
clearable
></el-input>
</div>
<div style="margin-left: 10px">
<el-select v-model="selectValue" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div style="margin-left: 10px">
<div>
<el-button type="primary" icon="el-icon-search" @click="getData"
>搜索</el-button
>
</div>
</div>
<div style="margin-left: 10px">
<div>
<el-button
type="primary"
icon="el-icon-search"
@click="getdetail('批量审核', ids)"
>批量审核</el-button
>
</div>
</div>
</div>
</el-header>
<div class="scTable" ref="scTableMain" v-loading="loading">
<div class="scTable-table">
<el-table
:data="tableData"
style="width: 100%"
ref="scTable"
:height="tableHeight"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column type="index" label="序号" width="80">
</el-table-column>
<el-table-column prop="goodsName" label="商品" show-overflow-tooltip> </el-table-column>
<!-- <el-table-column prop="domainInfo.introduce" label="简介">
</el-table-column> -->
<el-table-column prop="shopInfo.userName" label="发布者">
</el-table-column>
<!-- <el-table-column prop="workTag" label="标签"> </el-table-column> -->
<el-table-column prop="typeName" label="类型">
<template #default="scope">
<span>{{ scope.row.typeName }} - {{ scope.row.typesName }}</span>
</template>
</el-table-column>
<el-table-column prop="examineState" label="审核状态">
<template #default="scope">
<span v-if="scope.row.examineState == '0'" style="color: #409eff"
>未审核</span
>
<span
v-else-if="scope.row.examineState == '1'"
style="color: #67c23a"
>通过</span
>
<span
v-else-if="scope.row.examineState == '2'"
style="color: #f56c6c"
>拒绝</span
>
</template>
</el-table-column>
<el-table-column prop="examineUser" label="审核人">
<template #default="scope">
<span v-if="scope.row.examineUser">{{
scope.row.examineUser
}}</span>
<span v-else>暂无</span>
</template>
</el-table-column>
<el-table-column prop="examineDate" label="审核时间">
<template #default="scope">
<span v-if="scope.row.examineDate">{{
scope.row.examineDate
}}</span>
<span v-else>暂无</span>
</template>
</el-table-column>
<el-table-column label="操作" width="100">
<template #default="scope">
<span
style="
font-size: 14px;
color: #409eff;
margin-right: 10px;
cursor: pointer;
"
@click.stop="getdetail('审核', scope.row.id)"
v-if="scope.row.examineState == '0'"
>审核</span
>
<span
style="
font-size: 14px;
color: #409eff;
margin-right: 10px;
cursor: pointer;
"
@click.stop="getdetails('详情', scope.row)"
>详情</span
>
</template>
</el-table-column>
</el-table>
</div>
<div class="scTable-page">
<div class="scTable-pagination">
<el-pagination
background
:small="true"
layout="total, prev, pager, next, jumper"
:total="total"
:page-size="pageSize"
v-model:currentPage="currentPage"
@current-change="paginationChange"
></el-pagination>
</div>
<div class="scTable-do">
<el-button
@click="refresh"
icon="el-icon-refresh"
circle
style="margin-left: 15px"
></el-button>
</div>
</div>
</div>
<el-dialog
v-model="open"
:title="title"
destroy-on-close
:before-close="before"
width="50%"
>
<el-form :model="formState" label-width="100px">
<el-form-item label="状态" name="userName">
<el-radio-group v-model="formState.resource">
<el-radio :label="true">通过</el-radio>
<el-radio :label="false">不通过</el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item label="简介" name="artAtt">
<el-input type="textarea" v-model="formState.desc"></el-input>
</el-form-item> -->
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="handleClose">取消</el-button>
<el-button type="primary" @click="onFinish()"> 确定 </el-button>
</span>
</template>
</el-dialog>
<el-dialog
v-model="opens"
:title="title"
destroy-on-close
:before-close="before"
width="50%"
>
<el-form :model="detailForm" label-width="100px">
<el-form-item label="商品名称" >
<el-input v-model="detailForm.name"></el-input>
</el-form-item>
<el-form-item label="发布者">
<el-input v-model="detailForm.userName"></el-input>
</el-form-item>
<el-form-item label="简介">
<el-input type="textarea" v-model="detailForm.introduce"></el-input>
</el-form-item>
<el-form-item label="网盘地址">
<el-input v-model="detailForm.wpPath"></el-input>
</el-form-item>
<el-form-item label="提取码">
<el-input v-model="detailForm.code"></el-input>
</el-form-item>
<el-form-item label="文件">
<sc-upload-multiple :accept="''" v-model="imgList"></sc-upload-multiple>
<!-- <div v-for="(v,i) in imgList" :key="i">
<a :href="v" target="_blank">{{ v }}</a>
</div> -->
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="handleCloses">取消</el-button>
<el-button type="primary" @click="handleCloses"> 确定 </el-button>
</span>
</template>
</el-dialog>
</template>
<script>
import http from "@/utils/request";
import { defineAsyncComponent } from "vue";
const scEditor = defineAsyncComponent(() => import("@/components/scEditor"));
export default {
components: {
scEditor,
},
data() {
return {
inputStyle: {
paddingRight: "30px",
},
tableData: [],
pageSize: 20,
total: 0,
currentPage: 1,
loading: false,
tableHeight: "100%",
paginationLayout: "total, prev, pager, next, jumper",
value1: "",
open: false,
opens: false,
title: "修改",
formState: {
resource: true,
desc: "",
},
detailForm: {},
imgList: [],
multipleSelection: [],
ids: "",
selectValue: "",
options: [
{
value: "",
label: "全部",
},
{
value: "1",
label: "已通过",
},
{
value: "2",
label: "未通过",
},
{
value: "0",
label: "未审核",
},
],
};
},
created() {
this.$nextTick(() => {
this.upTableHeight();
});
},
mounted() {
this.getData();
},
methods: {
//
upTableHeight() {
this.tableHeight = this.$refs.scTableMain.offsetHeight - 50 + "px";
},
handleSelectionChange(val) {
this.multipleSelection = val;
let arr = [];
this.multipleSelection.forEach((item) => {
arr.push(item.id);
});
this.ids = arr.join(",");
},
//
getData() {
let parame = {
typesOf: "1",
examineState: this.selectValue,
title: this.value1,
page: this.currentPage,
size: this.pageSize,
};
http
.get("/api/goods/examineList", parame)
.then((res) => {
if (res.code == 200) {
this.tableData = res.data.records;
this.total = res.data.total;
this.currentPage = res.data.current;
this.loading = false;
}
})
.catch((err) => {
console.log(err);
this.loading = false;
});
},
//
paginationChange() {
this.getData();
},
//
refresh() {
this.$refs.scTable.clearSelection();
this.loading = true;
this.getData();
},
before() {
this.open = false;
this.opens = false;
// router.replace();
},
handleClose() {
this.open = false;
this.formState.desc = "";
this.formState.resource = true;
},
onFinish() {
// let parame = {
// ids: this.ids,
// examineState: this.formState.resource
// }
http
.post(
"/api/goods/examine?examineState=" +
this.formState.resource +
"&ids=" +
this.ids
)
.then((res) => {
if (res.code == 200) {
this.tableData = [];
this.total = 0;
this.currentPage = 1;
this.loading = true;
this.open = false;
this.getData();
}
})
.catch((err) => {
console.log(err);
});
},
getdetail(title, value) {
this.title = title;
this.open = true;
this.ids = value;
},
getdetails(title, value) {
this.imgList = [];
this.title = title;
this.opens = true;
this.detailForm.name = value.goodsName;
this.detailForm.wpPath = value.domainInfo.wpPath;
this.detailForm.code = value.domainInfo.code;
this.detailForm.userName = value.shopInfo.userName;
this.detailForm.introduce = value.domainInfo.introduce;
let img1 = null;
if (value.domainInfo.file) {
img1 = value.domainInfo.file.split(",");
if (img1.length > 0) {
img1.forEach((ele) => {
this.imgList.push({
path: ele,
preview: ele,
});
});
}
}
},
handleCloses() {
this.opens = false;
this.detailForm = {};
this.imgList = [];
},
},
};
</script>
<style scoped>
.scTable {
display: flex;
flex-direction: column;
height: calc(100% - 60px);
}
.scTable-table {
flex: 1;
}
.scTable-page {
height: 50px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 15px;
background-color: #fff;
}
.scTable-do {
white-space: nowrap;
}
</style>

View File

@ -24,10 +24,10 @@
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column> <el-table-column type="selection" width="55"></el-table-column>
<el-table-column type="index" label="序号" width="80"> </el-table-column> <el-table-column type="index" label="序号" width="80"> </el-table-column>
<el-table-column prop="name" label="标题"> </el-table-column> <el-table-column prop="name" label="标题" show-overflow-tooltip> </el-table-column>
<el-table-column prop="introduce" label="简介"> </el-table-column> <!-- <el-table-column prop="introduce" label="简介"> </el-table-column> -->
<el-table-column prop="userName" label="作者"> </el-table-column> <el-table-column prop="user.userName" label="发布者"> </el-table-column>
<el-table-column prop="workTag" label="标签"> </el-table-column> <!-- <el-table-column prop="workTag" label="标签"> </el-table-column> -->
<el-table-column prop="typeName" label="类型"> <el-table-column prop="typeName" label="类型">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.typeName }} - {{ scope.row.typesName }}</span> <span>{{ scope.row.typeName }} - {{ scope.row.typesName }}</span>
@ -99,12 +99,12 @@
<el-form-item label="作品名称"> <el-form-item label="作品名称">
<el-input v-model="detailForm.name"></el-input> <el-input v-model="detailForm.name"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="者"> <el-form-item label="发布者">
<el-input v-model="detailForm.userName"></el-input> <el-input v-model="detailForm.userName"></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="简介"> <el-form-item label="简介">
<el-input type="textarea" v-model="detailForm.introduce"></el-input> <el-input type="textarea" v-model="detailForm.introduce"></el-input>
</el-form-item> --> </el-form-item>
<el-form-item label="网盘地址"> <el-form-item label="网盘地址">
<el-input v-model="detailForm.wpPath"></el-input> <el-input v-model="detailForm.wpPath"></el-input>
</el-form-item> </el-form-item>
@ -121,7 +121,7 @@
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="handleCloses">取消</el-button> <el-button @click="handleCloses">取消</el-button>
<el-button type="primary" @click="onFinish()"> <el-button type="primary" @click="handleCloses">
确定 确定
</el-button> </el-button>
</span> </span>
@ -266,6 +266,7 @@ export default {
this.title = title this.title = title
this.opens = true this.opens = true
this.detailForm = value this.detailForm = value
this.detailForm.userName = value.user.userName
let img1 = value.file.split(',') let img1 = value.file.split(',')
if (img1.length > 0) { if (img1.length > 0) {
img1.forEach(ele => { img1.forEach(ele => {