视频调整
This commit is contained in:
parent
d77452dc25
commit
31dc945f8c
@ -1,7 +1,8 @@
|
||||
import request from '@/utils/request';
|
||||
import { LoginData, LoginResult, TenantInfo, VerifyCodeResult } from './types';
|
||||
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { LoginData, LoginResult, VerifyCodeResult, TenantInfo } from './types';
|
||||
import { UserInfo } from '@/api/system/user/types';
|
||||
import request from '@/utils/request';
|
||||
|
||||
// pc端固定客户端授权id
|
||||
const clientId = import.meta.env.VITE_APP_CLIENT_ID;
|
||||
@ -111,3 +112,13 @@ export function getTenantList(isToken: boolean): AxiosPromise<TenantInfo> {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 首页信息
|
||||
export function getIndex() {
|
||||
return request({
|
||||
url: '/count',
|
||||
method: 'get'
|
||||
// data: query,
|
||||
// params: pageReq
|
||||
});
|
||||
}
|
||||
|
@ -9,7 +9,25 @@ export function listPmsProduct(query, pageReq) {
|
||||
params: pageReq
|
||||
});
|
||||
}
|
||||
//审核
|
||||
export function productaudit(query, pageReq) {
|
||||
return request({
|
||||
url: '/pms/product/audit',
|
||||
method: 'get',
|
||||
data: query,
|
||||
params: pageReq
|
||||
});
|
||||
}
|
||||
|
||||
// 物品上下架
|
||||
export function productpublish(query, pageReq) {
|
||||
return request({
|
||||
url: '/pms/product/publish',
|
||||
method: 'get',
|
||||
data: query,
|
||||
params: pageReq
|
||||
});
|
||||
}
|
||||
// 查询商品信息详细
|
||||
export function getPmsProduct(id) {
|
||||
return request({
|
||||
@ -31,7 +49,7 @@ export function addPmsProduct(data) {
|
||||
export function updatePmsProduct(data) {
|
||||
return request({
|
||||
url: '/pms/product/update',
|
||||
method: 'put',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { AccountQuery, LeaveListVO, LeaveQuery, paramsaccountOV } from '@/api/set/messagetype';
|
||||
import { AccountQuery, LeaveListVO, LeaveQuery, paramsaccountOV, seachookOV } from '@/api/set/messagetype';
|
||||
|
||||
import { AxiosPromise } from 'axios';
|
||||
import request from '@/utils/request';
|
||||
@ -24,7 +24,17 @@ export const getnotice = (query?: string): AxiosPromise => {
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 模板修改
|
||||
* @param data
|
||||
*/
|
||||
export const updateCategory = (data: seachookOV) => {
|
||||
return request({
|
||||
url: '/system/message/template',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
//获取下拉列表
|
||||
export const listuserlist = (query?: string | number): AxiosPromise => {
|
||||
return request({
|
||||
|
@ -57,3 +57,50 @@ export interface TenantInfo {
|
||||
tenantEnabled: boolean;
|
||||
voList: TenantVO[];
|
||||
}
|
||||
|
||||
export interface top20Stores {
|
||||
company_name: string;
|
||||
sales: number;
|
||||
total_amount: string;
|
||||
}
|
||||
export interface top20Product {
|
||||
name: string;
|
||||
price: string;
|
||||
sales: number;
|
||||
total_amount: string;
|
||||
}
|
||||
export interface monthlyIncomeExpense {
|
||||
expense_amount: string;
|
||||
income_amount: string;
|
||||
month: string;
|
||||
}
|
||||
export interface monthlyUserVolume {
|
||||
addCartMemberCount: string;
|
||||
dealMemberCount: string;
|
||||
loginMemberCount: string;
|
||||
month: string;
|
||||
registerMemberCount: string;
|
||||
}
|
||||
|
||||
export interface monthlyVlog {
|
||||
month: string;
|
||||
vlog_count: number;
|
||||
}
|
||||
//首页
|
||||
export interface indexObjOV {
|
||||
StoreAudit: number;
|
||||
WithdrawCount: number;
|
||||
feedbackCount: number;
|
||||
memberCount: number;
|
||||
orderAudit: string;
|
||||
orderCount: number;
|
||||
productAudit: string;
|
||||
productCount: number;
|
||||
storeCount: number;
|
||||
vlogCount: number;
|
||||
top20Product: top20Product[];
|
||||
top20Stores: top20Stores[];
|
||||
monthlyIncomeExpense: monthlyIncomeExpense[];
|
||||
monthlyUserVolume: monthlyUserVolume[];
|
||||
monthlyVlog: monthlyVlog[];
|
||||
}
|
||||
|
@ -85,6 +85,7 @@ export default {
|
||||
modelValue: {
|
||||
handler(val) {
|
||||
if (val) {
|
||||
console.log(val);
|
||||
// 首先将值转为数组
|
||||
const list = Array.isArray(val) ? val : this.modelValue.split(',');
|
||||
// 然后将数组转为对象数组
|
||||
|
@ -230,38 +230,38 @@ export const dynamicRoutes: RouteRecordRaw[] = [
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/videoManage',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['system:user:edit'],
|
||||
children: [
|
||||
{
|
||||
path: 'video',
|
||||
component: () => import('@/views/contentManage/video/index.vue'),
|
||||
name: 'video',
|
||||
meta: { title: '视频列表', icon: 'dashboard', affix: true }
|
||||
},
|
||||
{
|
||||
path: 'videocomment',
|
||||
component: () => import('@/views/contentManage/videocomment/index.vue'),
|
||||
name: 'videocomment',
|
||||
meta: { title: '视频评论', icon: 'dashboard', affix: true }
|
||||
},
|
||||
{
|
||||
path: 'report',
|
||||
component: () => import('@/views/contentManage/report/index.vue'),
|
||||
name: 'report',
|
||||
meta: { title: '举报', icon: 'dashboard', affix: true }
|
||||
}
|
||||
// {
|
||||
// path: 'detail',
|
||||
// component: () => import('@/views/contentManage/videodetails/index.vue'),
|
||||
// name: 'Videodetails',
|
||||
// meta: { title: '视频详情', icon: 'dashboard', affix: true }
|
||||
// }
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: '/videoManage',
|
||||
// component: Layout,
|
||||
// hidden: true,
|
||||
// permissions: ['system:user:edit'],
|
||||
// children: [
|
||||
// {
|
||||
// path: 'video',
|
||||
// component: () => import('@/views/contentManage/video/index.vue'),
|
||||
// name: 'video',
|
||||
// meta: { title: '视频列表', icon: 'dashboard', affix: true }
|
||||
// },
|
||||
// {
|
||||
// path: 'videocomment',
|
||||
// component: () => import('@/views/contentManage/videocomment/index.vue'),
|
||||
// name: 'videocomment',
|
||||
// meta: { title: '视频评论', icon: 'dashboard', affix: true }
|
||||
// },
|
||||
// {
|
||||
// path: 'report',
|
||||
// component: () => import('@/views/contentManage/report/index.vue'),
|
||||
// name: 'report',
|
||||
// meta: { title: '举报', icon: 'dashboard', affix: true }
|
||||
// }
|
||||
// // {
|
||||
// // path: 'detail',
|
||||
// // component: () => import('@/views/contentManage/videodetails/index.vue'),
|
||||
// // name: 'Videodetails',
|
||||
// // meta: { title: '视频详情', icon: 'dashboard', affix: true }
|
||||
// // }
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
path: '/notice',
|
||||
component: Layout,
|
||||
|
@ -26,7 +26,7 @@
|
||||
>
|
||||
<el-table-column label="申请人" prop="status" align="center" width="100">
|
||||
<template #default="{ row }">
|
||||
{{ row.member.nickname }}
|
||||
{{ row.member == null ? '' : row.member.nickname }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
@ -56,7 +56,7 @@
|
||||
:default-expand-all="isExpandAll"
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
>
|
||||
<el-table-column label="视频id" prop="fileId" align="center" width="100" />
|
||||
<!-- <el-table-column label="视频id" prop="fileId" align="center" width="100" /> -->
|
||||
<el-table-column label="名称" prop="nickname" align="center" width="100" />
|
||||
<el-table-column label="手机号" prop="mobile" align="center" width="100" />
|
||||
<el-table-column label="审核状态" prop="reason" align="center" width="100">
|
||||
@ -71,7 +71,7 @@
|
||||
<el-table-column label="点赞数量" prop="likeCounts" align="center" width="100" />
|
||||
<el-table-column label="封面图片" align="center" width="200">
|
||||
<template #default="{ row }">
|
||||
<img alt="封面图片" style="max-width: 50%; max-height: 50%" :src="row.coverUrl" />
|
||||
<img alt="封面图片" style="max-width: 20%; max-height: 20%" :src="row.coverUrl" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="时间" align="center" prop="createTime" width="180" />
|
||||
|
@ -52,7 +52,7 @@
|
||||
<el-table-column label="视频" align="center" width="200">
|
||||
<template #default="{ row }">
|
||||
<!-- 假设 row 中有一个 videoUrl 属性存储视频地址 -->
|
||||
<video controls width="50%">
|
||||
<video controls width="40%">
|
||||
<source :src="row.vlogUrl" type="video/mp4" />
|
||||
您的浏览器不支持播放该视频。
|
||||
</video>
|
||||
@ -102,7 +102,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="评论者头像" align="center" width="200">
|
||||
<template #default="{ row }">
|
||||
<img alt="评论者头像" style="max-width: 50%; max-height: 50%" :src="row.replyUserFace" />
|
||||
<img alt="评论者头像" style="max-width: 20%; max-height: 20%" :src="row.replyUserFace" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
|
||||
|
105
src/views/dashboard/LineChartnew.vue
Normal file
105
src/views/dashboard/LineChartnew.vue
Normal file
@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<div id="LineChartnew" :style="{ width: width, height: height }"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
className: {
|
||||
type: String,
|
||||
default: 'chart'
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%'
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '350px'
|
||||
},
|
||||
autoResize: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
chartData: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
chartData: {
|
||||
deep: true,
|
||||
handler(val) {
|
||||
this.setOptions(val);
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.initChart();
|
||||
});
|
||||
},
|
||||
beforeUnmount() {
|
||||
if (!this.chart) {
|
||||
return;
|
||||
}
|
||||
this.chart.dispose();
|
||||
this.chart = null;
|
||||
},
|
||||
methods: {
|
||||
initChart() {
|
||||
const chartDom = document.getElementById('LineChartnew');
|
||||
this.chart = echarts.init(chartDom);
|
||||
this.setOptions(this.chartData);
|
||||
},
|
||||
setOptions(chartData) {
|
||||
console.log(chartData);
|
||||
let option = {};
|
||||
const series = [];
|
||||
chartData.series.forEach((item) => {
|
||||
series.push({
|
||||
name: item.name,
|
||||
type: 'line',
|
||||
data: item.data
|
||||
});
|
||||
});
|
||||
option = {
|
||||
title: {
|
||||
text: null,
|
||||
left: 'center'
|
||||
},
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
data: series.map((item) => item.name)
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: chartData.xAxisData
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: series
|
||||
};
|
||||
option && this.chart.setOption(option);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -3,43 +3,43 @@
|
||||
<el-card>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-statistic title="用户数量" :value="268500" />
|
||||
<el-statistic title="用户数量" :value="indexObj?.memberCount" />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-statistic title="店铺数量" :value="268500" />
|
||||
<el-statistic title="店铺数量" :value="indexObj?.storeCount" />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-statistic title="商品数量" :value="268500" />
|
||||
<el-statistic title="商品数量" :value="indexObj?.productCount" />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-statistic title="订单数量" :value="268500" />
|
||||
<el-statistic title="订单数量" :value="indexObj?.orderCount" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-row> 9 </el-row>
|
||||
<el-row> {{ indexObj?.productAudit }} </el-row>
|
||||
<el-row> 待审核商品 </el-row>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-row> 9 </el-row>
|
||||
<el-row> {{ indexObj?.StoreAudit }} </el-row>
|
||||
<el-row> 待审核店铺 </el-row>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-row> 9 </el-row>
|
||||
<el-row> {{ indexObj?.vlogCount }} </el-row>
|
||||
<el-row> 待审核视频 </el-row>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-row> 9 </el-row>
|
||||
<el-row> {{ indexObj?.orderAudit }} </el-row>
|
||||
<el-row> 待审核退款 </el-row>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-row> 9 </el-row>
|
||||
<el-row> {{ indexObj?.feedbackCount }} </el-row>
|
||||
<el-row> 待审核举报 </el-row>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-row> 9 </el-row>
|
||||
<el-row> {{ indexObj?.WithdrawCount }} </el-row>
|
||||
<el-row> 待审核提现 </el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -47,7 +47,9 @@
|
||||
<el-divider />
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-card header="分佣额"></el-card>
|
||||
<el-card header="分佣额">
|
||||
<el-row> 待审核提现 </el-row>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-card header="收入支出(万)"></el-card>
|
||||
@ -55,7 +57,9 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-card header="用户量"></el-card>
|
||||
<el-card header="用户量">
|
||||
<LineChartnew :chartData="LinechartData" />
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-card header="短视频"></el-card>
|
||||
@ -73,9 +77,38 @@
|
||||
</template>
|
||||
|
||||
<script setup name="Index" lang="ts">
|
||||
import { getIndex } from '@/api/login';
|
||||
import { indexObjOV } from '@/api/types';
|
||||
import LineChartnew from '@/views/dashboard/LineChartnew.vue'; //引入折线图
|
||||
const goTarget = (url: string) => {
|
||||
window.open(url, '__blank');
|
||||
};
|
||||
const indexObj = ref<indexObjOV>();
|
||||
const LinechartData = ref({
|
||||
color: 'red',
|
||||
xAxisData: [],
|
||||
series: [
|
||||
{ name: '用户量', data: [] },
|
||||
{ name: '在线用户', data: [] },
|
||||
{ name: '活跃', data: [] },
|
||||
{ name: '下单用户', data: [] }
|
||||
]
|
||||
});
|
||||
const getList = async () => {
|
||||
const res = await getIndex();
|
||||
indexObj.value = res.data;
|
||||
|
||||
res.data?.monthlyUserVolume.forEach((item) => {
|
||||
LinechartData.value.xAxisData.push(item.month);
|
||||
LinechartData.value.series[0].data.push(item.registerMemberCount);
|
||||
LinechartData.value.series[1].data.push(item.loginMemberCount);
|
||||
LinechartData.value.series[2].data.push(item.addCartMemberCount);
|
||||
LinechartData.value.series[3].data.push(item.dealMemberCount);
|
||||
});
|
||||
};
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -69,7 +69,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<el-form-item label="主图" prop="pic">
|
||||
<oss-image-upload v-model="form.pic" :limit="1"></oss-image-upload>
|
||||
<oss-image-upload v-model="form.pic" :limit="1" @input=""></oss-image-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="轮播图" prop="albumPics">
|
||||
<oss-image-upload v-model="albumPics" :limit="5"></oss-image-upload>
|
||||
@ -178,7 +178,7 @@ export default {
|
||||
name: [{ required: true, message: '请输入商品名称', trigger: 'blur' }]
|
||||
},
|
||||
form: {
|
||||
publishStatus: 0,
|
||||
publishStatus: '',
|
||||
sort: 1000
|
||||
},
|
||||
skuAttr: [],
|
||||
@ -250,7 +250,6 @@ export default {
|
||||
},
|
||||
categoryChange(value) {
|
||||
if (Array.isArray(value)) {
|
||||
console.log(value.toString());
|
||||
this.form.productCategoryName = value.toString();
|
||||
} else {
|
||||
this.form.productCategoryName = null;
|
||||
@ -261,11 +260,12 @@ export default {
|
||||
},
|
||||
getInfo(id) {
|
||||
getPmsProduct(id).then((response) => {
|
||||
const { albumPics } = response;
|
||||
const { albumPics } = response.data;
|
||||
if (albumPics) {
|
||||
this.albumPics = albumPics.split(',');
|
||||
}
|
||||
this.form = response;
|
||||
this.form = response.data;
|
||||
|
||||
if (this.form.productAttr) {
|
||||
this.productAttr = JSON.parse(this.form.productAttr);
|
||||
}
|
||||
@ -284,11 +284,12 @@ export default {
|
||||
}
|
||||
//商品价格没填时取sku的最低价
|
||||
if (!this.form.price) {
|
||||
this.form.price = Math.min.apply(
|
||||
Math,
|
||||
this.form.skuList.map((it) => it.price)
|
||||
);
|
||||
// this.form.price = Math.min.apply(
|
||||
// Math,
|
||||
this.form.skuList.map((it) => it.price);
|
||||
// );
|
||||
}
|
||||
|
||||
if (this.form.id != null) {
|
||||
updatePmsProduct(this.form).then((response) => {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
|
@ -35,23 +35,41 @@
|
||||
<el-image v-if="row.pic" :src="row.pic" :preview-src-list="[row.pic]" class="small-img" />
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="店铺名称" min-width="200" prop="outProductId"> </el-table-column>
|
||||
<el-table-column label="用户手机号" prop="outProductId"> </el-table-column>
|
||||
<el-table-column label="配送方式" prop="outProductId"> </el-table-column>
|
||||
<el-table-column label="商品名称" prop="outProductId"> </el-table-column>
|
||||
<el-table-column label="商品描述" prop="outProductId"> </el-table-column>
|
||||
<el-table-column label="商品类型" prop="outProductId"> </el-table-column>
|
||||
<el-table-column label="商品分类" prop="outProductId"> </el-table-column>
|
||||
<el-table-column label="商品封面图" prop="outProductId"> </el-table-column>
|
||||
<el-table-column label="商品轮播图" prop="outProductId"> </el-table-column>
|
||||
<el-table-column label="商品详情" prop="outProductId"> </el-table-column>
|
||||
<el-table-column label="原价" prop="outProductId"> </el-table-column>
|
||||
<el-table-column label="优惠金额" prop="outProductId"> </el-table-column>
|
||||
<el-table-column label="销量" prop="outProductId"> </el-table-column>
|
||||
<el-table-column label="商品状态" prop="outProductId" fixed="right">
|
||||
<el-table-column label="店铺名称" min-width="200" prop="contactUserName"> </el-table-column>
|
||||
<el-table-column label="店铺手机号" prop="contactPhone"> </el-table-column>
|
||||
<el-table-column label="配送方式" prop="distribution">
|
||||
<template v-slot="scope">{{ scope.row.distribution == 1 ? '到店核销' : scope.row.distribution == 2 ? '自提' : '配送' }} </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品名称" prop="name"> </el-table-column>
|
||||
<!-- <el-table-column label="商品描述" prop="describe"> </el-table-column> -->
|
||||
<el-table-column label="商品类型" prop="type">
|
||||
<template v-slot="scope">{{ scope.row.type == 1 ? '团购' : scope.row.type == 2 ? '拼团' : '秒杀' }} </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品分类" prop="productCategoryName"> </el-table-column>
|
||||
<el-table-column label="商品封面图" prop="pic">
|
||||
<template v-slot="scope">
|
||||
<el-image v-if="scope.row.pic" :src="scope.row.pic" class="small-img" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品轮播图" prop="albumPics">
|
||||
<template v-slot="scope">
|
||||
<el-image
|
||||
v-if="scope.row.albumPics"
|
||||
:src="scope.row.pic"
|
||||
:preview-teleported="true"
|
||||
class="small-img"
|
||||
:preview-src-list="isimgfun(scope.row.albumPics)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品详情" prop="detailHtml"> </el-table-column>
|
||||
<el-table-column label="原价" prop="price"> </el-table-column>
|
||||
<el-table-column label="优惠金额" prop="discountPrice"> </el-table-column>
|
||||
<el-table-column label="销量" prop="sales"> </el-table-column>
|
||||
<el-table-column label="商品状态" prop="publishStatus" fixed="right">
|
||||
<template v-slot="scope">
|
||||
<el-switch
|
||||
:model-value="scope.row.status"
|
||||
:model-value="scope.row.publishStatus"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
active-text="上架"
|
||||
@ -59,16 +77,17 @@
|
||||
inline-prompt
|
||||
:before-change="
|
||||
() => {
|
||||
// return handleChangeUserStatus(scope.row);
|
||||
return handleChangeUserStatus(scope.row);
|
||||
}
|
||||
"
|
||||
>
|
||||
</el-switch> </template
|
||||
></el-table-column>
|
||||
<el-table-column label="审核状态" prop="outProductId" fixed="right">
|
||||
<el-table-column label="审核状态" prop="authFlag" fixed="right">
|
||||
<template v-slot="scope">
|
||||
<el-switch
|
||||
:model-value="scope.row.status"
|
||||
{{ scope.row.authFlag == 1 ? '待审核' : scope.row.authFlag == 2 ? '审核通过' : '审核驳回' }}
|
||||
<!-- <el-switch
|
||||
:model-value="scope.row.authFlag"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
active-text="通过"
|
||||
@ -80,8 +99,9 @@
|
||||
}
|
||||
"
|
||||
>
|
||||
</el-switch> </template
|
||||
></el-table-column>
|
||||
</el-switch> -->
|
||||
</template></el-table-column
|
||||
>
|
||||
<!-- <el-table-column label="名称/编码" min-width="200" prop="outProductId">
|
||||
<template v-slot="{ row }">
|
||||
<div>名称:{{ row.name }}</div>
|
||||
@ -108,6 +128,7 @@
|
||||
<el-table-column label="操作" class-name="small-padding fixed-width" width="150" align="center" fixed="right">
|
||||
<template v-slot="scope">
|
||||
<el-button text type="primary" icon="Edit" @click="handleUpdate(scope.row)">修改 </el-button>
|
||||
<el-button text type="primary" icon="Edit" @click="handleAuth(scope.row)">审核 </el-button>
|
||||
<el-button text type="primary" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
<!-- <template v-slot="scope">
|
||||
@ -117,6 +138,23 @@
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
<el-dialog title="商品审核" v-model="isAuthModalOpen" width="600px">
|
||||
<el-form label-width="auto" ref="authForm" size="default">
|
||||
<el-form-item label="审核状态" prop="authFlag">
|
||||
<el-radio-group v-model="authInfo.authFlag">
|
||||
<el-radio label="2">通过</el-radio>
|
||||
<el-radio label="3">驳回</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="反驳理由" prop="authRemark" v-if="authInfo.authFlag === '3'">
|
||||
<el-input v-model.trim="authInfo.reasons" placeholder="请输入反驳理由" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="authRemark">
|
||||
<el-button type="primary" @click="authInfoProduct">确认</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
<!--编辑会员基础信息-->
|
||||
<el-dialog title="编辑商品详情" v-model="productModalInfo.open" width="600px" append-to-body>
|
||||
<el-form label-width="auto" :rules="productEditRules" :model="productModalInfo.data" ref="editForm" size="default">
|
||||
@ -176,7 +214,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { delPmsProduct, listPmsProduct } from '@/api/pms/product';
|
||||
import { delPmsProduct, listPmsProduct, productpublish, productaudit } from '@/api/pms/product';
|
||||
import { isStarRepo } from '@/utils/is-star-plugin';
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
import AddressSelector from '@/views/components/AddressSelector/index.vue';
|
||||
@ -188,6 +226,13 @@ export default {
|
||||
dicts: ['pms_publish_status'],
|
||||
data() {
|
||||
return {
|
||||
authInfo: {
|
||||
id: '',
|
||||
authFlag: 1,
|
||||
reasons: ''
|
||||
},
|
||||
//审核弹出
|
||||
isAuthModalOpen: false,
|
||||
show: true,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -254,6 +299,57 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//审核
|
||||
async authInfoProduct() {
|
||||
const res = await productaudit(this.authInfo, this.authInfo);
|
||||
if (res.code == 200) {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess('审核成功');
|
||||
this.isAuthModalOpen = false;
|
||||
this.authInfo = {
|
||||
id: '',
|
||||
authFlag: 1,
|
||||
reasons: ''
|
||||
};
|
||||
}
|
||||
},
|
||||
handleAuth(row) {
|
||||
this.authInfo.id = row.id;
|
||||
this.isAuthModalOpen = true;
|
||||
},
|
||||
//上下架
|
||||
async handleChangeUserStatus(row) {
|
||||
await ElMessageBox.confirm(row.publishStatus == 0 ? '确定要上架该商品吗?' : '确定要下架该商品吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
if (row.publishStatus == 0) {
|
||||
const res = await productpublish({ id: row.id, publishStatus: 1 }, { id: row.id, publishStatus: 1 });
|
||||
console.log(res.code);
|
||||
if (res.code == 200) {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess('上架成功');
|
||||
}
|
||||
} else {
|
||||
const res = await productpublish({ id: row.id, publishStatus: 0 }, { id: row.id, publishStatus: 0 });
|
||||
if (res.code == 200) {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess('下架成功');
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
isimgfun(url) {
|
||||
if (!url || typeof url !== 'string') {
|
||||
console.log('无效的 URL 输入');
|
||||
return [];
|
||||
}
|
||||
const urls = url.split(',');
|
||||
// 过滤掉空的 URL
|
||||
const validUrls = urls.filter((item) => item.trim() !== '');
|
||||
return validUrls;
|
||||
},
|
||||
submitEditProduct() {
|
||||
this.$refs['editForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
@ -350,11 +446,18 @@ export default {
|
||||
return delPmsProduct(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess('删除成功');
|
||||
this.getList();
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
::v-deep {
|
||||
.el-image-viewer__canvas {
|
||||
z-index: 9999;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -130,7 +130,7 @@
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" @click="cilcikgAdd">修改</el-button>
|
||||
<el-button type="primary" @click="clickupdate">修改</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@ -138,7 +138,7 @@
|
||||
</template>
|
||||
|
||||
<script setup name="Leave" lang="ts">
|
||||
import { listtemplate, templateAdd, deltemplate, getnotice } from '@/api/set/messageindex';
|
||||
import { listtemplate, templateAdd, deltemplate, getnotice, updateCategory } from '@/api/set/messageindex';
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const showSearch = ref(true);
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
@ -253,10 +253,25 @@ const updatefun = async (id?: string) => {
|
||||
updatedialog.value = true;
|
||||
}
|
||||
};
|
||||
const clickupdate = async () => {
|
||||
const res = await updateCategory(updatahook.value);
|
||||
if (res.code == 200) {
|
||||
updatedialog.value = false;
|
||||
getlist();
|
||||
}
|
||||
};
|
||||
//新增
|
||||
const cilcikgAdd = async () => {
|
||||
const res = await templateAdd(dataparams.value);
|
||||
if (res.code == 200) {
|
||||
showRefuteDialog.value = false;
|
||||
dataparams.value = {
|
||||
templateType: null,
|
||||
templateCode: null,
|
||||
templateName: null,
|
||||
templateContent: null,
|
||||
title: null
|
||||
};
|
||||
getlist();
|
||||
}
|
||||
};
|
||||
|
@ -44,12 +44,12 @@
|
||||
<el-table-column label="标题" prop="title" align="center" width="150" />
|
||||
<el-table-column label="内容" prop="content" align="center" width="150" />
|
||||
<el-table-column label="创建时间" prop="createTime" align="center" width="200" />
|
||||
<el-table-column label="定时发送时间" prop="scheduledTime" align="center" width="200" />
|
||||
<el-table-column label="触发类型" prop="title" align="center" width="150">
|
||||
<!-- <el-table-column label="定时发送时间" prop="scheduledTime" align="center" width="200" /> -->
|
||||
<!-- <el-table-column label="触发类型" prop="title" align="center" width="150">
|
||||
<template #default="{ row }">
|
||||
{{ row.msgType == 1 ? '手动' : '自动' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="消息类型" prop="title" align="center" width="150">
|
||||
<template #default="{ row }">
|
||||
{{ isSub[row.subType] }}
|
||||
@ -132,9 +132,9 @@
|
||||
<el-option label="通知" value="4" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="手自动时间">
|
||||
<!-- <el-form-item label="手自动时间">
|
||||
<el-date-picker v-model="dataparams.scheduledTime" type="datetime" placeholder="请输入自动发送时间" />
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
@ -214,10 +214,6 @@ const rules = reactive({
|
||||
id: [{ required: false, message: '请输入', trigger: 'blur' }],
|
||||
sendScope: [{ required: true, message: '请输入内容', trigger: 'blur' }]
|
||||
});
|
||||
const select = ref([
|
||||
{ label: '自动', value: 0 },
|
||||
{ label: '手动', value: 1 }
|
||||
]);
|
||||
const handleQuery = () => {
|
||||
getlist();
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user