优化用户管理、商品管理及UI细节

This commit is contained in:
钊钊 2024-12-25 16:10:24 +08:00
parent a168f7a0e4
commit 504412a9b6
18 changed files with 275 additions and 217 deletions

View File

@ -103,7 +103,6 @@ export interface DyUserVO {
*
*/
latitude: number;
}
export interface DyUserForm extends BaseEntity {
@ -135,7 +134,7 @@ export interface DyUserForm extends BaseEntity {
/**
*
*/
status?: string;
status?: number;
/**
* IP
@ -211,11 +210,9 @@ export interface DyUserForm extends BaseEntity {
*
*/
latitude?: number;
}
export interface DyUserQuery extends PageQuery {
/**
*
*/
@ -316,6 +313,3 @@ export interface DyUserQuery extends PageQuery {
*/
params?: any;
}

View File

@ -66,9 +66,10 @@ export const delProduct = (id: string | number | Array<string | number>) => {
*
* @returns
*/
export const productAll = () => {
export const productAll = (query?: any) => {
return request({
url: '/manage/product/all',
method: 'get'
method: 'get',
params: query
});
};

View File

@ -186,10 +186,19 @@ const handleDelete = (row: any) => {
*/
const formatTag = (tagId: string | null) => {
let tagString = '';
// for (let i = 0; i < props.sys_user_tagOptions.length; i++) {
// const element:any = props.sys_user_tagOptions[i];
// if (tagId?.includes(element.id)) {
// tagString += ',' + element.title;
// }
// }
for (let i = 0; i < props.sys_user_tagOptions.length; i++) {
const element:any = props.sys_user_tagOptions[i];
if (tagId?.includes(element.id)) {
tagString += ',' + element.title;
if (tagId!=null) {
let filteredArray = tagId.split(',').filter((item) => item==element.id);
if (filteredArray.length>0) {
tagString += '' + element.title;
}
}
}
return tagString.substring(1);

View File

@ -73,13 +73,13 @@
v-hasPermi="['manage:article:edit']">发布</el-button>
<el-button link type="primary" v-if="scope.row.status == 2" @click="updateRow(scope.row,'0')"
v-hasPermi="['manage:article:edit']">撤销发布</el-button>
<el-tooltip content="修改" placement="top" v-if="scope.row.status == 0">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:article:edit']"></el-button>
<el-tooltip content="编辑" placement="top" v-if="scope.row.status == 0">
<el-button link type="primary" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:article:edit']">编辑</el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top" v-if="scope.row.status == 0">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
v-hasPermi="['manage:article:remove']"></el-button>
<el-button link type="primary" @click="handleDelete(scope.row)"
v-hasPermi="['manage:article:remove']">删除</el-button>
</el-tooltip>
</template>
</el-table-column>

View File

@ -33,7 +33,7 @@
<el-tabs type="border-card" v-model="activeName" @tab-change="handleClick">
<el-tab-pane label="发现页banner" :name="0">
<el-table :height="autoTableHeight" v-loading="loading" :data="bannerList"
<el-table :height="autoTableHeight-70" v-loading="loading" :data="bannerList"
@selection-change="handleSelectionChange" border>
<el-table-column label="banner名称" align="center" prop="name" />
<el-table-column label="图片" align="center" prop="imgUrlList" width="100px" />
@ -47,26 +47,26 @@
<el-tag v-if="scope.row.status == 1" type="success">已上架</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150px">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180px">
<template #default="scope">
<el-button link type="primary" @click="putaway(scope.row,'0')" v-hasPermi="['manage:banner:edit']"
v-if="scope.row.status == 1">下架</el-button>
<el-button link type="primary" @click="putaway(scope.row,'1')" v-hasPermi="['manage:banner:edit']"
v-if="scope.row.status == 0">上架</el-button>
<el-tooltip content="编辑" placement="top" v-if="scope.row.status == 0">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:banner:edit']"></el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:banner:edit']">编辑</el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top" v-if="scope.row.status == 0">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
v-hasPermi="['manage:banner:remove']"></el-button>
<el-button link type="primary" @click="handleDelete(scope.row)"
v-hasPermi="['manage:banner:remove']">删除</el-button>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="租车图片" :name="1">
<el-table :height="autoTableHeight" v-loading="loading" :data="bannerList"
<el-table :height="autoTableHeight-70" v-loading="loading" :data="bannerList"
@selection-change="handleSelectionChange" border>
<el-table-column label="banner名称" align="center" prop="name" />
<el-table-column label="图片" align="center" prop="imgUrlList" width="100px" />
@ -80,26 +80,26 @@
<el-tag v-if="scope.row.status == 1" type="success">已上架</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150px">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180px">
<template #default="scope">
<el-button link type="primary" @click="putaway(scope.row,'0')" v-hasPermi="['manage:banner:edit']"
v-if="scope.row.status == 1">下架</el-button>
<el-button link type="primary" @click="putaway(scope.row,'1')" v-hasPermi="['manage:banner:edit']"
v-if="scope.row.status == 0">上架</el-button>
<el-tooltip content="编辑" placement="top" v-if="scope.row.status == 0">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:banner:edit']"></el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:banner:edit']">编辑</el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top" v-if="scope.row.status == 0">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
v-hasPermi="['manage:banner:remove']"></el-button>
<el-button link type="primary" @click="handleDelete(scope.row)"
v-hasPermi="['manage:banner:remove']">删除</el-button>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="租游艇图片" :name="2">
<el-table :height="autoTableHeight" v-loading="loading" :data="bannerList"
<el-table :height="autoTableHeight-70" v-loading="loading" :data="bannerList"
@selection-change="handleSelectionChange" border>
<el-table-column label="banner名称" align="center" prop="name" />
<el-table-column label="图片" align="center" prop="imgUrlList" width="100px" />
@ -113,26 +113,26 @@
<el-tag v-if="scope.row.status == 1" type="success">已上架</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150px">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180px">
<template #default="scope">
<el-button link type="primary" @click="putaway(scope.row,'0')" v-hasPermi="['manage:banner:edit']"
v-if="scope.row.status == 1">下架</el-button>
<el-button link type="primary" @click="putaway(scope.row,'1')" v-hasPermi="['manage:banner:edit']"
v-if="scope.row.status == 0">上架</el-button>
<el-tooltip content="编辑" placement="top" v-if="scope.row.status == 0">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:banner:edit']"></el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:banner:edit']">编辑</el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top" v-if="scope.row.status == 0">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
v-hasPermi="['manage:banner:remove']"></el-button>
<el-button link type="primary" @click="handleDelete(scope.row)"
v-hasPermi="['manage:banner:remove']">删除</el-button>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="行政区域景点图片" :name="3">
<el-table :height="autoTableHeight" v-loading="loading" :data="bannerList"
<el-table :height="autoTableHeight-70" v-loading="loading" :data="bannerList"
@selection-change="handleSelectionChange" border>
<el-table-column label="banner名称" align="center" prop="name" />
<el-table-column label="图片" align="center" prop="imgUrlList" width="100px" />
@ -151,19 +151,19 @@
<el-tag v-if="scope.row.status == 1" type="success">已上架</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150px">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180px">
<template #default="scope">
<el-button link type="primary" @click="putaway(scope.row,'0')" v-hasPermi="['manage:banner:edit']"
v-if="scope.row.status == 1">下架</el-button>
<el-button link type="primary" @click="putaway(scope.row,'1')" v-hasPermi="['manage:banner:edit']"
v-if="scope.row.status == 0">上架</el-button>
<el-tooltip content="编辑" placement="top" v-if="scope.row.status == 0">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:banner:edit']"></el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:banner:edit']">编辑</el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top" v-if="scope.row.status == 0">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
v-hasPermi="['manage:banner:remove']"></el-button>
<el-button link type="primary" @click="handleDelete(scope.row)"
v-hasPermi="['manage:banner:remove']">删除</el-button>
</el-tooltip>
</template>
</el-table-column>
@ -225,7 +225,7 @@ import { listBanner, getBanner, delBanner, addBanner, updateBanner,regionTree }
import { BannerVO, BannerQuery, BannerForm } from '@/api/manage/banner/types';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const autoTableHeight = ref<number>(750);
const bannerList = ref<BannerVO[]>([]);
const buttonLoading = ref(false);
const loading = ref(true);
@ -408,7 +408,6 @@ const handleExport = () => {
}
// tab
const activeName = ref(0);
const autoTableHeight = ref(750);
const handleClick = (tab: any) => {
activeName.value = tab;
queryParams.value.type = tab;

View File

@ -37,8 +37,8 @@
<!-- <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['manage:dyUser:edit']"
>封禁</el-button
> -->
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()"
v-hasPermi="['manage:dyUser:remove']">注销</el-button>
<!-- <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()"
v-hasPermi="['manage:dyUser:remove']">注销</el-button> -->
</el-form-item>
</el-form>
</el-card>
@ -76,7 +76,7 @@
<el-table-column label="生日" align="center" prop="birthday" width="100">
<template #default="scope">
<!-- <span>{{ parseTime(scope.row.birthday, '{y}-{m}-{d}') }}</span> -->
<span>{{ scope.row.birthday }}</span>
<span>{{ scope.row.birthday?.split(' ')[0] }}</span>
</template>
</el-table-column>
<el-table-column width="55" label="年龄" align="center" prop="age" />
@ -132,19 +132,29 @@
@click="openInviteListDialog(scope.row)">35</span>
</template>
</el-table-column>
<el-table-column width="80" label="处理方式" align="center" prop="" />
<el-table-column width="150" label="封禁理由" align="center" prop="reason" show-overflow-tooltip />
<el-table-column width="80" label="处理方式" align="center" prop="">
<template #default="scope">
<dict-tag :options="dy_user_status" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column width="150" label="封禁理由" align="center" prop="reason" show-overflow-tooltip>
<template #default="scope">
<dict-tag :options="dy_user_ban_mode" :value="scope.row.reason" />
</template>
</el-table-column>
<el-table-column width="80" label="封禁天数" align="center" prop="banDays">
<template #default="scope">
<dict-tag :options="dy_user_ban_days" :value="scope.row.banDays" />
</template>
</el-table-column>
<el-table-column width="120" label="操作时间" align="center" prop="" />
<el-table-column width="90" label="操作人" align="center" prop="" />
<el-table-column width="120" label="操作时间" align="center" prop="" />
<el-table-column fixed="right" label="操作" min-width="120">
<template #default="scope">
<el-button link type="primary" size="small" v-hasPermi="['manage:dyUser:edit']"
<el-button link type="primary" size="small" v-hasPermi="['manage:dyUser:edit']" v-if="scope.row.status == 0"
@click="openbanned(scope.row)">封禁</el-button>
<el-button link type="primary" size="small" v-hasPermi="['manage:dyUser:edit']" v-if="scope.row.status != 0"
@click="handleStatus(scope.row)">解封</el-button>
<!-- <el-button link type="primary" size="small">权限</el-button> -->
</template>
</el-table-column>
@ -496,7 +506,21 @@ const openbanned = async (row: DyUserVO) => {
dialog.visible = true;
dialog.rowData = row;
};
/**
* 解封用户
* @param row
*/
const handleStatus = async (row: DyUserVO) => {
await proxy?.$modal.confirm('是否确认解封用户昵称为"' + row.nickName + '"的数据项?')
Object.assign(form.value, row);
form.value.status = 0;
form.value.reason = null;
form.value.banDays=null
loading.value = true;
await updateDyUser(form.value).finally(() => (loading.value = false));
proxy?.$modal.msgSuccess('操作成功');
await getList();
}
/**
* 打开笔记列表弹层
* @param row
@ -660,7 +684,7 @@ const openInviteListDialog = async (row: DyUserVO) => {
if (row.id) {
inviteListDialog.params.userId = row?.id;
}
let res = await userOrders(inviteListDialog.params);
let res = await userInvite(inviteListDialog.params);
inviteListDialog.inviteList = res.rows;
inviteListDialog.total = res.total;
inviteListDialog.visible = true;

View File

@ -41,7 +41,8 @@
<el-table-column label="排序" align="center" prop="shor" />
<el-table-column label="发布状态" align="center" prop="status">
<template #default="scope">
<span>{{ scope.row.status == 1 ? '已发布' : '未发布'}}</span>
<el-tag v-if="scope.row.status == 1" type="success">已发布</el-tag>
<el-tag v-else type="info">未发布</el-tag>
</template>
</el-table-column>
<el-table-column label="创建者" align="center" prop="createName" />
@ -57,13 +58,13 @@
v-hasPermi="['manage:ipImage:edit']">发布</el-button>
<el-button link type="primary" @click="handleStatus(scope.row,0)" v-if="scope.row.status==1"
v-hasPermi="['manage:ipImage:edit']">撤销发布</el-button>
<el-tooltip content="修改" placement="top">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-if="scope.row.status == 0"
v-hasPermi="['manage:ipImage:edit']"></el-button>
<el-tooltip content="编辑" placement="top">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-if="scope.row.status == 0"
v-hasPermi="['manage:ipImage:edit']">编辑</el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-if="scope.row.status == 0"
v-hasPermi="['manage:ipImage:remove']"></el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-if="scope.row.status == 0"
v-hasPermi="['manage:ipImage:remove']">删除</el-button>
</el-tooltip>
</template>
</el-table-column>

View File

@ -49,9 +49,9 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row,'edit')"
v-hasPermi="['manage:mkConfig:edit']"></el-button>
<el-tooltip content="编辑" placement="top">
<el-button link type="primary" @click="handleUpdate(scope.row,'edit')" v-if="scope.row.status == 0"
v-hasPermi="['manage:mkConfig:edit']">编辑</el-button>
</el-tooltip>
<el-button link type="primary" @click="handleStatus(scope.row,'1')" v-if="scope.row.status == 0"
v-hasPermi="['manage:mkConfig:edit']">发布</el-button>
@ -131,7 +131,7 @@
<el-col :span="2">
<vxe-button mode="text" v-if="index == 0&&dialog.type == 'edit'" icon="vxe-icon-add"
class="handle_btn add_btn" @click="amendRoundConfig(index,'add')"></vxe-button>
<vxe-button mode="text" v-else-if="index == 0&&dialog.type == 'edit'" icon="vxe-icon-minus"
<vxe-button mode="text" v-else-if="index != 0&&dialog.type == 'edit'" icon="vxe-icon-minus"
class="handle_btn rem_btn" @click="amendRoundConfig(index,'remove')"></vxe-button>
</el-col>
</el-row>
@ -389,9 +389,12 @@ const submitForm = () => {
let roundConfig_copy=[];
for (let i = 0; i < form.value.roundConfig.length; i++) {
const element = form.value.roundConfig[i];
if (element.rewardType&&element.goodsId&&element.rewardNum) {
if ((element.rewardType!=null&&element.goodsId&&element.rewardNum)||(element.rewardType==0&&element.rewardNum)) {
roundConfig_copy.push(element);
}else{
console.log(element);
console.log(element.rewardType);
proxy?.$modal.msgError(`奖品${i+1}配置不完整`);
return
}
@ -505,7 +508,7 @@ const getlistVendor = async () => {
*/
const productAllList=ref([]);
const getProductAllList=()=>{
productAll().then(res=>{
productAll({status:1}).then(res=>{
Object.assign(productAllList.value,res.data)
})
}

View File

@ -56,21 +56,21 @@
<span>{{ scope.row.status == 1 ? '已上架' : '未上架'}}</span>
</template>
</el-table-column>
<el-table-column label="创建者" align="center" prop="createByName" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180" />
<el-table-column label="创建者" align="center" prop="updateByName" />
<el-table-column label="创建时间" align="center" prop="updateTime" width="180" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleStatus(scope.row,'1')" v-if="scope.row.status == 0"
v-hasPermi="['manage:mkPostcard:edit']">上架</el-button>
<el-button link type="primary" @click="handleStatus(scope.row,'0')" v-if="scope.row.status == 1"
v-hasPermi="['manage:mkPostcard:edit']">下架</el-button>
<el-tooltip content="修改" placement="top" v-if="scope.row.status == 0">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:mkPostcard:edit']"></el-button>
<el-tooltip content="编辑" placement="top" v-if="scope.row.status == 0">
<el-button link type="primary" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:mkPostcard:edit']">编辑</el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top" v-if="scope.row.status == 0">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
v-hasPermi="['manage:mkPostcard:remove']"></el-button>
<el-button link type="primary" @click="handleDelete(scope.row)"
v-hasPermi="['manage:mkPostcard:remove']">删除</el-button>
</el-tooltip>
</template>
</el-table-column>
@ -211,7 +211,7 @@ const getList = async () => {
*/
const contentAllList= ref([]);
const getContentAll = async () => {
const res = await contentAll({type:'0'});
const res = await contentAll({type:'0',status:2});
Object.assign(contentAllList.value, res);
}
/** 取消按钮 */

View File

@ -1,7 +1,8 @@
<!-- 笔记管理 -->
<template>
<div class="p-2">
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<transition :enter-active-class="proxy?.animate.searchAnimate.enter"
:leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
@ -19,7 +20,8 @@
</el-form-item>
<el-form-item label="发布状态" prop="tagId">
<!-- <el-input v-model="queryParams.tagId" placeholder="请输入标签" clearable @keyup.enter="handleQuery" /> -->
<el-select v-model="queryParams.status" placeholder="请选择发布状态" style="width: 240px" @keyup.enter="handleQuery">
<el-select v-model="queryParams.tagId" placeholder="请选择发布状态" style="width: 240px"
@keyup.enter="handleQuery">
<el-option v-for="item in statusoptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
@ -36,7 +38,8 @@
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button v-hasPermi="['manage:notebook:add']" type="primary" plain icon="Plus" @click="handleAdd">新增 </el-button>
<el-button v-hasPermi="['manage:notebook:add']" type="primary" plain icon="Plus" @click="handleAdd">新增
</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button v-hasPermi="['manage:notebook:remove']" type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()"-->
@ -98,39 +101,23 @@
<el-table-column label="操作时间" align="center" prop="updateTime" width="200px" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150px">
<template #default="scope">
<div v-if="scope.row.userZombie == true">
<el-button
v-if="scope.row.status == 0 || scope.row.status == 1"
v-hasPermi="['manage:notebook:edit']"
link
type="primary"
@click="handleUpdate(scope.row)"
>编辑</el-button
>
<el-button v-if="scope.row.status == 0" v-hasPermi="['manage:notebook:edit']" link type="primary" @click="fabudata(scope.row)"
>发布</el-button
>
<el-button v-if="scope.row.status == 3" v-hasPermi="['manage:notebook:edit']" link type="primary" @click="fabudata(scope.row)"
>撤销发布</el-button
>
<el-button v-if="scope.row.status == 0||scope.row.status == 1" v-hasPermi="['manage:notebook:edit']" link
type="primary" @click="handleUpdate(scope.row)">编辑</el-button>
<el-button v-if="scope.row.status == 0" v-hasPermi="['manage:notebook:edit']" link type="primary"
@click="fabudata(scope.row)">发布</el-button>
<el-button v-if="scope.row.status == 3" v-hasPermi="['manage:notebook:edit']" link type="primary"
@click="fabudata(scope.row)">撤销发布</el-button>
<!-- <el-tooltip content="发布" placement="top">-->
<!-- <el-button v-hasPermi="['manage:notebook:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>-->
<!-- </el-tooltip>-->
<el-button
v-if="scope.row.status == 0 || scope.row.status == 1"
v-hasPermi="['manage:notebook:remove']"
link
type="primary"
@click="handleDelete(scope.row)"
>删除</el-button
>
</div>
<el-button v-if="scope.row.status == 0||scope.row.status == 1" v-hasPermi="['manage:notebook:remove']" link
type="primary" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" :total="total" @pagination="getList" />
<pagination v-show="total > 0" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
:total="total" @pagination="getList" />
</el-card>
<!-- 添加或修改笔记对话框 -->
<el-dialog v-model="dialog.visible" :title="dialog.title" width="60%" append-to-body>
@ -310,13 +297,18 @@ watch(
*/
const formatTag = (tagId: string | null) => {
let tagString = '';
let arrlist = tagId?.split(',').map(Number);
// for (let i = 0; i < sys_user_tagOptions.value.length; i++) {
// const element = sys_user_tagOptions.value[i];
// if (tagId?.includes(element.id)) {
// tagString += ',' + element.title;
// }
// }
for (let i = 0; i < sys_user_tagOptions.value.length; i++) {
const element = sys_user_tagOptions.value[i];
for (let j = 0; j < arrlist.length; j++) {
const conten = arrlist[j];
if (conten == element.id) {
tagString += ',' + element.title;
if (tagId!=null) {
let filteredArray = tagId.split(',').filter((item) => item==element.id);
if (filteredArray.length>0) {
tagString += '' + element.title;
}
}
}

View File

@ -70,13 +70,13 @@
v-if="scope.row.status==0">上架</el-button>
<el-button link type="primary" @click="handleStatus(scope.row,'0')" v-hasPermi="['manage:product:edit']"
v-if="scope.row.status==1">下架</el-button>
<el-tooltip content="修改" placement="top" v-if="scope.row.status==0">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:product:edit']"></el-button>
<el-tooltip content="编辑" placement="top" v-if="scope.row.status==0">
<el-button link type="primary" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:product:edit']">编辑</el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top" v-if="scope.row.status==0">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
v-hasPermi="['manage:product:remove']"></el-button>
<el-button link type="primary" @click="handleDelete(scope.row)"
v-hasPermi="['manage:product:remove']">删除</el-button>
</el-tooltip>
</template>
</el-table-column>
@ -251,6 +251,8 @@ const handleAdd = () => {
reset();
dialog.visible = true;
dialog.title = "添加商品信息";
getlistVendor(); //
getProductCategoryList(); //
}
/** 修改按钮操作 */
@ -261,6 +263,8 @@ const handleUpdate = async (row?: ProductVO) => {
Object.assign(form.value, res.data);
dialog.visible = true;
dialog.title = "修改商品信息";
getlistVendor(); //
getProductCategoryList(); //
}
/**
* 上架 下架 商品

View File

@ -56,13 +56,13 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:productCategory:edit']"></el-button>
<el-tooltip content="编辑" placement="top">
<el-button link type="primary" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:productCategory:edit']">编辑</el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
v-hasPermi="['manage:productCategory:remove']"></el-button>
<el-button link type="primary" @click="handleDelete(scope.row)"
v-hasPermi="['manage:productCategory:remove']">删除</el-button>
</el-tooltip>
</template>
</el-table-column>

View File

@ -1,29 +1,34 @@
<!-- 路线导航管理列表 -->
<template>
<div class="p-2">
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<transition :enter-active-class="proxy?.animate.searchAnimate.enter"
:leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" id="search_div" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="70px">
<el-form-item label="线路标题" prop="">
<el-input v-model="queryParams.title" class="inputWidth" placeholder="请输入线路标题" clearable @keyup.enter="handleQuery" />
<el-input v-model="queryParams.title" class="inputWidth" placeholder="请输入线路标题" clearable
@keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="发布状态" prop="">
<el-select v-model="queryParams.status" class="inputWidth" placeholder="请选择发布状态" clearable>
<el-option v-for="dict in note_publish_list" :key="dict.value" :label="dict.label" :value="dict.value" />
<el-option v-for="dict in note_publish_list" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button v-hasPermi="['system:Route:add']" type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
<el-button v-hasPermi="['system:Route:add']" type="primary" plain icon="Plus"
@click="handleAdd">新增</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</transition>
<el-table v-loading="loading" :height="autoTableHeight" :data="RouteList" border @selection-change="handleSelectionChange">
<el-table v-loading="loading" :height="autoTableHeight" :data="RouteList" border
@selection-change="handleSelectionChange">
<el-table-column label="ID" align="center" prop="id" width="180px" fixed />
<el-table-column label="线路标题" align="center" prop="title" width="150px" show-overflow-tooltip fixed />
<el-table-column label="线路封面" align="center" prop="" />
@ -75,40 +80,20 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160px" fixed="right">
<template #default="scope">
<el-button
v-if="scope.row.status == 0 || scope.row.status == 1"
v-hasPermi="['system:Route:edit']"
link
type="primary"
@click="handleUpdate(scope.row)"
>编辑</el-button
>
<el-button
v-if="scope.row.status == 0 || scope.row.status == 1"
v-hasPermi="['system:Route:remove']"
link
type="primary"
@click="handleDelete(scope.row)"
>删除</el-button
>
<el-button v-if="scope.row.status == 0" v-hasPermi="['system:Route:remove']" link type="primary" @click="savelistrow(scope.row, 1)"
>发布</el-button
>
<el-button v-if="scope.row.status == 3" v-hasPermi="['system:Route:remove']" link type="primary" @click="savelistrow(scope.row, 0)"
>撤销发布</el-button
>
<el-button v-if="scope.row.status == 0 || scope.row.status == 1" v-hasPermi="['system:Route:edit']" link
type="primary" @click="handleUpdate(scope.row)">编辑</el-button>
<el-button v-if="scope.row.status == 0 || scope.row.status == 1" v-hasPermi="['system:Route:remove']" link
type="primary" @click="handleDelete(scope.row)">删除</el-button>
<el-button v-if="scope.row.status == 0" v-hasPermi="['system:Route:remove']" link type="primary"
@click="savelistrow(scope.row)">发布</el-button>
<el-button v-if="scope.row.status == 3" v-hasPermi="['system:Route:remove']" link type="primary"
@click="savelistrow(scope.row)">撤销发布</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
id="table_page"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
:total="total"
@pagination="getList"
/>
<pagination v-show="total > 0" id="table_page" v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize" :total="total" @pagination="getList" />
<!-- 添加或修改景点租赁管理对话框 -->
<el-dialog v-model="dialog.visible" :title="dialog.title" width="60%" append-to-body>
<el-form ref="RouteFormRef" :model="form" :rules="rules" label-width="120px">
@ -125,8 +110,9 @@
<el-option v-for="item in sys_user_tagOptions" :key="item.id" :label="item.title" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="涉及的行政区域" prop="region">
<el-cascader v-model="treevalue" :options="regiontree" :props="props" clearable placeholder="请选择涉及的行政区域" style="width: 400px" />
<el-form-item label="涉及的行政区域" prop="treevalue">
<el-cascader v-model="treevalue" :options="regiontree" :props="props" clearable placeholder="请选择涉及的行政区域"
style="width: 400px" />
</el-form-item>
<div style="display: flex">
<el-form-item label="行程天数" prop="routeDays">
@ -190,13 +176,15 @@
<el-input v-model="routeDetailsList.title" placeholder="请输入标题" style="width: 500px" />
</el-form-item>
<el-form-item label="描述">
<el-input v-model="routeDetailsList.description" placeholder="请输入描述" style="width: 500px" autosize type="textarea" />
<el-input v-model="routeDetailsList.description" placeholder="请输入描述" style="width: 500px" autosize
type="textarea" />
</el-form-item>
<el-form-item label="添加地点">
<el-button type="primary" @click="addjingdain">添加景点</el-button>
</el-form-item>
<div v-for="(item, index) in routeDetailsList.lowerList" class="articlelist">
<CircleClose v-if="index != 0" style="width: 2em; height: 2em; position: relative; left: 98%" @click="delLowerList(index)" />
<CircleClose v-if="index != 0" style="width: 2em; height: 2em; position: relative; left: 98%"
@click="delLowerList(index)" />
<el-form-item label="添加地点">
<el-select v-model="item.articleId" placeholder="请选择标记地点" size="large" style="width: 500px">
<el-option v-for="item in sys_user_contentOptions" :key="item.id" :label="item.name" :value="item.id" />
@ -514,10 +502,19 @@ const handleAdd = () => {
*/
const formatTag = (tagId: string | null) => {
let tagString = '';
// for (let i = 0; i < sys_user_tagOptions.value.length; i++) {
// const element = sys_user_tagOptions.value[i];
// if (tagId?.includes(element.id)) {
// tagString += ',' + element.title;
// }
// }
for (let i = 0; i < sys_user_tagOptions.value.length; i++) {
const element = sys_user_tagOptions.value[i];
if (tagId?.includes(element.id)) {
tagString += ',' + element.title;
if (tagId!=null) {
let filteredArray = tagId.split(',').filter((item) => item==element.id);
if (filteredArray.length>0) {
tagString += '' + element.title;
}
}
}
return tagString.substring(1);
@ -786,6 +783,7 @@ const delLowerList = (index) => {
margin-top: 10px !important;
padding-bottom: 10px !important;
}
.routeDetailsListitem {
width: 85%;
margin: 10px auto;
@ -793,14 +791,17 @@ const delLowerList = (index) => {
background-color: #f2f2f2;
padding: 20px;
line-height: 22px;
.title {
font-weight: 600;
font-size: 16px;
}
}
.hotellistcalss {
display: flex;
margin-top: 20px;
.hotelitem {
background-color: #fff;
padding: 20px;
@ -808,17 +809,20 @@ const delLowerList = (index) => {
line-height: 25px;
margin-right: 20px;
width: 30%;
.title {
font-weight: 600;
font-size: 14px;
color: #000;
}
.address {
font-size: 12px;
color: #4a5663;
}
}
}
.articlelist {
width: 90%;
margin: 20px auto;

View File

@ -66,7 +66,7 @@
<el-table-column label="ID" align="center" prop="id" fixed v-if="false" width="50px" />
<el-table-column label="景点名称" align="center" prop="name" fixed v-if="queryParams.type == '0'" width="180px" />
<el-table-column label="商家名称" align="center" prop="name" fixed v-if="queryParams.type != '0'" width="180px" />
<el-table-column label="排序" align="center" prop="orderNum" v-if="queryParams.type != '2'" width="60px" />
<el-table-column label="排序" align="center" prop="orderNum" width="60px" />
<el-table-column label="等级" align="center" prop="level" v-if="queryParams.type == '0'">
<template #default="scope">
{{ formatLevel(scope.row.level) }}
@ -126,26 +126,30 @@
</template>
</el-table-column>
<!-- 0-未发布 1-审核中 2-发布 -->
<el-table-column label="发布状态" align="center" prop="status">
<el-table-column label="发布状态" align="center" prop="status" width="100">
<template #default="scope">
<span>{{ scope.row.status == 0 ? '未发布' : scope.row.status == 1 ? '审核中' : scope.row.status == 2 ? '已发布' : '草稿' }}</span>
<!-- <span>{{ scope.row.status == 0 ? '未发布' : scope.row.status == 1 ? '审核中' : scope.row.status == 2 ? '已发布' : '草稿' }}</span> -->
<el-tag v-if="scope.row.status == 0" type="info">未发布</el-tag>
<el-tag v-if="scope.row.status == 1" type="warning">审核中</el-tag>
<el-tag v-if="scope.row.status == 2" type="success">已发布</el-tag>
<el-tag v-if="scope.row.status == 3" type="danger">草稿</el-tag>
</template>
</el-table-column>
<el-table-column label="操作人" align="center" prop="updateByName" width="120px" />
<el-table-column label="操作时间" align="center" prop="updateTime" width="160px" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="170px">
<template #default="scope">
<el-button link type="primary" v-if="scope.row.status == 0" @click="updateRow(scope.row, '2')"
<el-button link type="primary" v-if="scope.row.status == 0" @click="updateRow(scope.row, '1')"
v-hasPermi="['manage:content:edit']">发布</el-button>
<el-button link type="primary" v-if="scope.row.status == 2" @click="updateRow(scope.row, '0')"
v-hasPermi="['manage:content:edit']">撤销发布</el-button>
<el-tooltip content="修改" placement="top" v-if="scope.row.status == 0||scope.row.status == 3">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:content:edit']"></el-button>
<el-tooltip content="编辑" placement="top" v-if="scope.row.status == 0||scope.row.status == 3">
<el-button link type="primary" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:content:edit']">编辑</el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top" v-if="scope.row.status == 0||scope.row.status == 3">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
v-hasPermi="['manage:content:remove']"></el-button>
<el-button link type="primary" @click="handleDelete(scope.row)"
v-hasPermi="['manage:content:remove']">删除</el-button>
</el-tooltip>
</template>
</el-table-column>
@ -767,8 +771,11 @@ const formatTag = (tagId: string | null) => {
let tagString = '';
for (let i = 0; i < sys_user_tagOptions.value.length; i++) {
const element = sys_user_tagOptions.value[i];
if (tagId?.includes(element.id)) {
tagString += ',' + element.title;
if (tagId!=null) {
let filteredArray = tagId.split(',').filter((item) => item==element.id);
if (filteredArray.length>0) {
tagString += '' + element.title;
}
}
}
return tagString.substring(1);
@ -793,7 +800,7 @@ const handleUpdate = async (row?: any) => {
proxy?.$modal.msgError('已发布的文章,无法修改');
return
}
res.data.tagId_copy = res.data.tagId?.split(',');
res.data.tagId_copy = (res.data.tagId==''||res.data.tagId==null)?[]:res.data.tagId?.split(',');
if (res.data.region == null) {
res.data.region = res.data.city;
res.data.regionCode = res.data.city;
@ -885,9 +892,11 @@ const submitForm = async (type: string) => {
*/
const updateRow = async (row: any, type: string) => {
await proxy?.$modal.confirm('是否确认' + (type == '0' ? '撤销发布' : '发布') + '名称为"' + row.name + '"的数据项?');
row.status = type;
// row.status = type;
Object.assign(form.value, row);
form.value.status = type;
buttonLoading.value = true;
await updateArticle(row).finally(() => (buttonLoading.value = false));
await updateArticle(form.value).finally(() => (buttonLoading.value = false));
proxy?.$modal.msgSuccess('操作成功');
getList();
};

View File

@ -17,10 +17,10 @@
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" plain icon="Plus" @click="handleAdd"
v-hasPermi="['manage:tag:add']">新增</el-button>
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()"
<!-- <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()"
v-hasPermi="['manage:tag:edit']">修改</el-button>
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()"
v-hasPermi="['manage:tag:remove']">删除</el-button>
v-hasPermi="['manage:tag:remove']">删除</el-button> -->
</el-form-item>
</el-form>
</el-card>
@ -28,7 +28,7 @@
</transition>
<el-table v-loading="loading" :height="autoTableHeight" :data="tagList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="标签ID" align="center" prop="id" v-if="false" width="70px" />
<el-table-column label="标签名称" align="center" prop="title" />
<el-table-column label="排序" align="center" prop="sort" />
@ -41,13 +41,13 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:tag:edit']"></el-button>
<el-tooltip content="编辑" placement="top">
<el-button link type="primary" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:tag:edit']">编辑</el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
v-hasPermi="['manage:tag:remove']"></el-button>
<el-button link type="primary" @click="handleDelete(scope.row)"
v-hasPermi="['manage:tag:remove']">删除</el-button>
</el-tooltip>
</template>
</el-table-column>

View File

@ -10,8 +10,8 @@
<el-input class="inputWidth" v-model="queryParams.levelName" placeholder="请输入等级名称" clearable
@keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="积分上限" prop="score">
<el-input class="inputWidth" v-model="queryParams.score" placeholder="请输入积分上限" clearable
<el-form-item label="所达积分" prop="score">
<el-input class="inputWidth" type="number" v-model="queryParams.score" placeholder="请输入积分" clearable
@keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="状态" prop="status">
@ -27,10 +27,10 @@
<el-button type="primary" plain icon="Plus" @click="handleAdd"
v-hasPermi="['manage:userLevel:add']">新增</el-button>
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()"
<!-- <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()"
v-hasPermi="['manage:userLevel:edit']">修改</el-button>
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()"
v-hasPermi="['manage:userLevel:remove']">删除</el-button>
v-hasPermi="['manage:userLevel:remove']">删除</el-button> -->
</el-form-item>
</el-form>
</el-card>
@ -39,7 +39,7 @@
<el-table :height="autoTableHeight" v-loading="loading" :data="userLevelList"
@selection-change="handleSelectionChange" border>
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="用户等级" align="center" prop="levelName" />
<el-table-column label="等级所达积分" align="center" prop="score" />
<el-table-column label="排序" align="center" prop="orderNum" />
@ -59,13 +59,17 @@
<el-table-column label="积分上限" align="center" prop="score" /> -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:userLevel:edit']"></el-button>
<el-button link type="primary" @click="handleStatus(scope.row,1)" v-if="scope.row.status==0"
v-hasPermi="['manage:userLevel:edit']">发布</el-button>
<el-button link type="primary" @click="handleStatus(scope.row,0)" v-if="scope.row.status==1"
v-hasPermi="['manage:userLevel:edit']">撤销发布</el-button>
<el-tooltip content="编辑" placement="top" v-if="scope.row.status==0">
<el-button link type="primary" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:userLevel:edit']">编辑</el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
v-hasPermi="['manage:userLevel:remove']"></el-button>
<el-tooltip content="删除" placement="top" v-if="scope.row.status==0">
<el-button link type="primary" @click="handleDelete(scope.row)"
v-hasPermi="['manage:userLevel:remove']">删除</el-button>
</el-tooltip>
</template>
</el-table-column>
@ -79,18 +83,18 @@
<el-form-item label="等级名称" prop="levelName">
<el-input v-model="form.levelName" placeholder="请输入等级名称" />
</el-form-item>
<el-form-item label="积分上限" prop="score">
<el-input v-model="form.score" placeholder="请输入积分上限" />
<el-form-item label="所达积分" prop="score">
<el-input v-model="form.score" type="number" placeholder="请输入积分" />
</el-form-item>
<el-form-item label="排序" prop="orderNum">
<el-input v-model="form.orderNum" placeholder="请输入排序" />
<el-input-number v-model="form.orderNum" :min="1" :max="10000" />
</el-form-item>
<el-form-item label="状态" prop="status">
<!-- <el-form-item label="状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio v-for="dict in dy_user_level_status" :key="dict.value"
:value="parseInt(dict.value)">{{ dict.label }}</el-radio>
</el-radio-group>
</el-form-item>
</el-form-item> -->
</el-form>
<template #footer>
<div class="dialog-footer">
@ -130,9 +134,9 @@ const dialog = reactive<DialogOption>({
const initFormData: UserLevelForm = {
id: undefined,
levelName: undefined,
status: undefined,
status: 0,
score: undefined,
orderNum: undefined
orderNum: 1
};
const data = reactive<PageData<UserLevelForm, UserLevelQuery>>({
form: { ...initFormData },
@ -148,8 +152,8 @@ const data = reactive<PageData<UserLevelForm, UserLevelQuery>>({
rules: {
id: [{ required: true, message: '等级ID不能为空', trigger: 'blur' }],
levelName: [{ required: true, message: '等级名称不能为空', trigger: 'blur' }],
status: [{ required: true, message: '状态不能为空', trigger: 'change' }],
score: [{ required: true, message: '积分上限不能为空', trigger: 'blur' }],
// status: [{ required: true, message: '', trigger: 'change' }],
score: [{ required: true, message: '所达积分不能为空', trigger: 'blur' }],
orderNum: [{ required: true, message: '排序不能为空', trigger: 'blur' }]
}
});
@ -220,7 +224,20 @@ const handleUpdate = async (row?: UserLevelVO) => {
dialog.visible = true;
dialog.title = '修改用户等级';
};
/**
* 发布 撤销发布
* @param row
* @param status
*/
const handleStatus = async (row?: UserLevelVO, status?: number) => {
await proxy?.$modal.confirm(`确定要${status == 1 ? '发布' : '撤销发布'}用户等级为"${row?.levelName}"的数据项吗?`)
loading.value=true;
Object.assign(form.value, row);
form.value.status = status;
await updateUserLevel(form.value).finally(() => loading.value = false);
proxy?.$modal.msgSuccess(`${status == 1 ? '发布' : '撤销发布'}成功`);
await getList();
}
/** 提交按钮 */
const submitForm = () => {
userLevelFormRef.value?.validate(async (valid: boolean) => {
@ -241,7 +258,7 @@ const submitForm = () => {
/** 删除按钮操作 */
const handleDelete = async (row?: UserLevelVO) => {
const _ids = row?.id || ids.value;
await proxy?.$modal.confirm('是否确认删除用户等级编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
await proxy?.$modal.confirm('是否确认删除用户等级为"' + row.levelName + '"的数据项?').finally(() => (loading.value = false));
await delUserLevel(_ids);
proxy?.$modal.msgSuccess('删除成功');
await getList();

View File

@ -24,7 +24,7 @@
</div>
</transition>
<el-table v-loading="loading" :height="autoTableHeight" :data="vendorList"
<el-table v-loading="loading" :height="autoTableHeight" :data="vendorList" border
@selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="供应商名称" align="center" prop="vendorName" />
@ -38,13 +38,13 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:vendor:edit']"></el-button>
<el-tooltip content="编辑" placement="top">
<el-button link type="primary" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:vendor:edit']">编辑</el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
v-hasPermi="['manage:vendor:remove']"></el-button>
<el-button link type="primary" @click="handleDelete(scope.row)"
v-hasPermi="['manage:vendor:remove']">删除</el-button>
</el-tooltip>
</template>
</el-table-column>

View File

@ -54,9 +54,9 @@
<el-table-column label="操作时间" align="center" prop="updateTime" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:appMenu:edit']"></el-button>
<el-tooltip content="编辑" placement="top">
<el-button link type="primary" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:appMenu:edit']">编辑</el-button>
</el-tooltip>
</template>
</el-table-column>
@ -114,7 +114,8 @@ const appMenuFormRef = ref<ElFormInstance>();
const dialog = reactive<DialogOption>({
visible: false,
title: ''
title: '',
type:''
});
const initFormData: AppMenuForm = {