update:证书&优惠券&订单
This commit is contained in:
parent
7db1e9cdd2
commit
d99647a0e0
178
src/api/match/order.js
Normal file
178
src/api/match/order.js
Normal file
@ -0,0 +1,178 @@
|
||||
import { BaseApi } from '../baseApi';
|
||||
import { http } from '../../utils/request';
|
||||
|
||||
// ==================== 订单管理 ====================
|
||||
|
||||
/**
|
||||
* 创建订单
|
||||
* @param {Object} data - 订单信息
|
||||
* @param {number} data.eventId - 赛事ID
|
||||
* @param {number} data.registrationMode - 报名模式 (1:个人报名, 2:团队报名)
|
||||
* @param {string} [data.teamName] - 团队名称(团队报名时必填)
|
||||
* @param {string} data.contactName - 联系人姓名
|
||||
* @param {string} data.contactPhone - 联系人电话
|
||||
* @param {Array<Object>} data.items - 报名项目列表
|
||||
* @param {number} data.items[].projectId - 项目ID
|
||||
* @param {string} data.items[].projectName - 项目名称
|
||||
* @param {string} data.items[].projectTypeName - 项目类型名称
|
||||
* @param {string} data.items[].groupName - 组别名称
|
||||
* @param {number} data.items[].unitPrice - 单价
|
||||
* @param {number} data.items[].personCount - 人数
|
||||
* @param {Array<Object>} data.persons - 参赛人员列表
|
||||
* @param {string} data.persons[].name - 姓名
|
||||
* @param {string} data.persons[].idCard - 身份证号
|
||||
* @param {string} data.persons[].phone - 联系电话
|
||||
* @param {string} data.persons[].gender - 性别 (Male=男, Female=女)
|
||||
* @returns {Promise<string>} - 返回订单号
|
||||
*/
|
||||
export const orderCreatePost = (data) => {
|
||||
return http.post('/order/create', data);
|
||||
};
|
||||
|
||||
/**
|
||||
* 订单分页查询
|
||||
* @param {Object} params - 查询参数
|
||||
* @param {number} [params.pageNo] - 当前页码
|
||||
* @param {number} [params.pageSize] - 每页条数
|
||||
* @param {string} [params.orderNo] - 订单号
|
||||
* @param {string} [params.contactName] - 联系人姓名
|
||||
* @param {string} [params.contactPhone] - 联系人电话
|
||||
* @param {number} [params.eventId] - 赛事ID
|
||||
* @param {number} [params.status] - 订单状态 (0:待支付, 1:已支付, 2:已取消, 3:已退款, 4:已完成)
|
||||
* @param {string} [params.startTime] - 开始时间
|
||||
* @param {string} [params.endTime] - 结束时间
|
||||
*/
|
||||
export const orderPageGet = (params) => {
|
||||
return http.get('/order/page', { params });
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取订单详情
|
||||
* @param {Object} params - 查询参数
|
||||
* @param {string} params.orderNo - 订单号
|
||||
* @returns {Promise<{
|
||||
* orderNo: string,
|
||||
* eventId: number,
|
||||
* eventName: string,
|
||||
* registrationMode: number,
|
||||
* teamName: string,
|
||||
* contactName: string,
|
||||
* contactPhone: string,
|
||||
* totalAmount: number,
|
||||
* discountAmount: number,
|
||||
* payableAmount: number,
|
||||
* status: number,
|
||||
* createdTime: string,
|
||||
* paidTime: string,
|
||||
* items: Array<{
|
||||
* projectId: number,
|
||||
* projectName: string,
|
||||
* projectTypeName: string,
|
||||
* groupName: string,
|
||||
* unitPrice: number,
|
||||
* personCount: number,
|
||||
* subtotal: number
|
||||
* }>,
|
||||
* persons: Array<{
|
||||
* name: string,
|
||||
* idCard: string,
|
||||
* phone: string,
|
||||
* gender: string,
|
||||
* birthDate: string,
|
||||
* age: number
|
||||
* }>
|
||||
* }>}
|
||||
*/
|
||||
export const orderDetailGet = (params) => {
|
||||
return http.get('/order/detail', { params });
|
||||
};
|
||||
|
||||
/**
|
||||
* 更新订单状态
|
||||
* @param {Object} data - 状态信息
|
||||
* @param {string} data.orderNo - 订单号
|
||||
* @param {number} data.status - 订单状态 (0:待支付, 1:已支付, 2:已取消, 3:已退款, 4:已完成)
|
||||
* @param {string} [data.remark] - 备注说明
|
||||
*/
|
||||
export const orderStatusPut = (data) => {
|
||||
return http.put('/order/status', data);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取建议退款金额
|
||||
* @param {Object} params - 查询参数
|
||||
* @param {string} params.orderNo - 订单号
|
||||
* @param {Array<number>} [params.itemIds] - 退款项目ID列表(部分退款时传)
|
||||
* @returns {Promise<{
|
||||
* totalRefundAmount: number,
|
||||
* refundableAmount: number,
|
||||
* refundItems: Array<{
|
||||
* itemId: number,
|
||||
* projectName: string,
|
||||
* unitPrice: number,
|
||||
* personCount: number,
|
||||
* subtotal: number,
|
||||
* refundableAmount: number
|
||||
* }>
|
||||
* }>}
|
||||
*/
|
||||
export const orderRefundAmountGet = (params) => {
|
||||
return http.get('/order/refund-amount', { params });
|
||||
};
|
||||
|
||||
/**
|
||||
* 订单退款
|
||||
* @param {Object} data - 退款信息
|
||||
* @param {string} data.orderNo - 订单号
|
||||
* @param {number} data.refundAmount - 退款金额
|
||||
* @param {Array<number>} [data.itemIds] - 退款项目ID列表(部分退款时传)
|
||||
* @param {string} data.reason - 退款原因
|
||||
* @param {string} [data.remark] - 备注说明
|
||||
*/
|
||||
export const orderRefundPost = (data) => {
|
||||
return http.post('/order/refund', data);
|
||||
};
|
||||
|
||||
/**
|
||||
* 批量删除订单
|
||||
* @param {Array<string>} data - 订单号数组
|
||||
*/
|
||||
export const orderDeletePost = (data) => {
|
||||
return http.post('/order/delete', data);
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除单个订单
|
||||
* @param {Object} data - 删除参数
|
||||
* @param {string} data.id - 订单ID
|
||||
*/
|
||||
export const orderDeleteDelete = (data) => {
|
||||
return http.delete('/order/delete', { data });
|
||||
};
|
||||
|
||||
/**
|
||||
* 导出订单
|
||||
* @param {Object} params - 导出参数
|
||||
* @param {number} [params.eventId] - 赛事ID
|
||||
* @param {number} [params.status] - 订单状态
|
||||
* @param {string} [params.startTime] - 开始时间
|
||||
* @param {string} [params.endTime] - 结束时间
|
||||
* @param {string} [params.fileType] - 文件类型 (excel, csv)
|
||||
* @returns {Promise<Blob>} - 返回文件流
|
||||
*/
|
||||
export const orderExportGet = (params) => {
|
||||
return http.get('/order/export', {
|
||||
params,
|
||||
responseType: 'blob'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改订单状态(通用状态修改)
|
||||
* @param {Object} data - 状态参数
|
||||
* @param {number} data.id - 订单ID
|
||||
* @param {string} data.status - 状态 (Enable=启用, Disable=禁用)
|
||||
*/
|
||||
export const orderSetstatusPatch = (data) => {
|
||||
return http.patch('/order/setstatus', data);
|
||||
};
|
||||
@ -1,16 +1,19 @@
|
||||
<template>
|
||||
<div class="system-menu-container layout-padding">
|
||||
<ProTable ref="tableRef" :request-api="certificatePageGet" :columns="columns" :pagination="true"
|
||||
:tool-button="false">
|
||||
<ProTable ref="tableRef" :request-api="certificatePageGet" :columns="columns" :initParam="initParam"
|
||||
:pagination="true" :tool-button="false">
|
||||
<template #tools>
|
||||
<el-button v-auth="'certificate:add'" type="primary" icon="ele-Plus" @click="onOpenMenu"> 新增 </el-button>
|
||||
<el-button v-auth="'certificate:add'" type="primary" icon="ele-Plus" @click="onOpenMenu()"> 新增
|
||||
</el-button>
|
||||
</template>
|
||||
<template #index="scope">
|
||||
{{ scope.$index + 1 }}
|
||||
</template>
|
||||
|
||||
|
||||
<template #remark="scope">
|
||||
<img :src="scope.row.remark" style="width: 100px;" />
|
||||
<!-- <img :src="scope.row.remark" style="width: 100px;" /> -->
|
||||
<el-button size="small" text type="primary"
|
||||
@click="lookBook(scope.row.remark)"> 查看模板 </el-button>
|
||||
</template>
|
||||
<!-- <template #status="scope">
|
||||
<el-tag :type="scope.row.status === 0 ? 'success' : 'danger'"> {{ scope.row.status === 0 ? '启用' : '禁用'
|
||||
@ -18,7 +21,7 @@
|
||||
</template> -->
|
||||
<template #action="scope">
|
||||
<el-button v-auth="'certificate:edit'" icon="ele-Edit" size="small" text type="primary"
|
||||
@click="onOpenMenu(scope.row.id)"> 编辑 </el-button>
|
||||
@click="onOpenMenu(scope.row)"> 编辑 </el-button>
|
||||
<el-popconfirm title="确认删除吗?" @confirm="onDeleteMenu(scope.row.id)">
|
||||
<template #reference>
|
||||
<el-button v-auth="'certificate:delete'" icon="ele-Delete" size="small" text type="danger"> 删除
|
||||
@ -29,24 +32,27 @@
|
||||
</ProTable>
|
||||
|
||||
<!-- 弹窗 -->
|
||||
<el-dialog title="新增" v-model="isShowDialog" width="60%">
|
||||
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="200px"
|
||||
<el-dialog :title="dialogTitle" v-model="isShowDialog" width="60%">
|
||||
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="180px"
|
||||
style="width: 80%;margin-bottom: 30px;max-width: 600px" v-if="isShowDialog">
|
||||
|
||||
<!-- 证书名称 -->
|
||||
<el-form-item label="证书名称" prop="name" >
|
||||
<el-form-item label="证书名称" prop="name">
|
||||
<el-input v-model="formData.name" placeholder="请输入证书名称"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<!-- 证书模板 -->
|
||||
<el-form-item label="证书模板" prop="remark">
|
||||
<el-upload class="avatar-uploader" action="/api/file/upload"
|
||||
:show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
|
||||
<img v-if="formData.remark" :src="formData.remark" class="avatar" />
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
<el-form-item label="证书模板" prop="templateId">
|
||||
<el-upload class="avatar-uploader" :name="'templateFile'" :headers="headers" accept=".doc,.docx"
|
||||
action="/api/certificatetemplate/uploaddoctemplate" :show-file-list="true" drag
|
||||
:on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
|
||||
|
||||
<template #default>
|
||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||
|
||||
<div class="el-upload__text">仅支持上传.doc和.docx文件</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
@ -68,21 +74,32 @@ import { ElMessage, ElForm } from 'element-plus';
|
||||
import SysMenuApi from '/@/api/SysMenuApi';
|
||||
import { auths } from '/@/utils/authFunction';
|
||||
import ProTable from '/@/components/ProTable/index.vue';
|
||||
import { certificatePageGet, certificateAddPost ,certificateEditPut ,certificateDeleteDelete} from '/@/api/match/certificate';
|
||||
|
||||
import { certificatePageGet, certificateAddPost, certificateEditPut, certificateDeleteDelete } from '/@/api/match/certificate';
|
||||
import { Session } from '/@/utils/storage';
|
||||
// 定义表单引用类型
|
||||
const formRef = ref();
|
||||
|
||||
const formData = ref({
|
||||
name: '',
|
||||
remark: '',
|
||||
templateId: '',
|
||||
code: "",
|
||||
remark: "",
|
||||
status: 0,
|
||||
sort: 0
|
||||
})
|
||||
const initParam = ref({ refresh: true });
|
||||
const headers = {
|
||||
Authorization: 'Bearer ' + Session.get('access-token'),
|
||||
};
|
||||
|
||||
const lookBook = (url) => {
|
||||
window.open(url);
|
||||
}
|
||||
const formRules = ref({
|
||||
name: [
|
||||
{ required: true, message: '请输入证书名称', trigger: 'blur' }
|
||||
],
|
||||
remark: [
|
||||
templateId: [
|
||||
{ required: true, message: '请上传证书模版', trigger: 'blur' }
|
||||
],
|
||||
|
||||
@ -109,38 +126,51 @@ const columns = ref([
|
||||
const isShowDialog = ref(false);
|
||||
const dialogTitle = ref('新增');
|
||||
|
||||
const onOpenMenu = (id) => {
|
||||
dialogTitle.value = id ? '编辑' : '新增';
|
||||
formData.value = {
|
||||
name: '',
|
||||
remark: '',
|
||||
};
|
||||
const onOpenMenu = (row) => {
|
||||
dialogTitle.value = row.id ? '编辑' : '新增';
|
||||
if (row) {
|
||||
formData.value = row;
|
||||
} else {
|
||||
formData.value = {
|
||||
name: '',
|
||||
templateId: '',
|
||||
code: "",
|
||||
remark: "",
|
||||
status: 0,
|
||||
sort: 0
|
||||
};
|
||||
}
|
||||
isShowDialog.value = true;
|
||||
};
|
||||
|
||||
//删除菜单
|
||||
const onDeleteMenu = async (id) => {
|
||||
const { succeeded, errors } = await SysMenuApi.delete({ id });
|
||||
const { succeeded, errors } = await certificateDeleteDelete({ id });
|
||||
if (succeeded) {
|
||||
initParam.value.refresh = !initParam.value.refresh;
|
||||
ElMessage.success('删除成功');
|
||||
} else {
|
||||
ElMessage.error(errors);
|
||||
}
|
||||
};
|
||||
|
||||
const handleAvatarSuccess = (response,uploadFile) => {
|
||||
formData.value.remark = response[0].url;
|
||||
const handleAvatarSuccess = (response, uploadFile) => {
|
||||
console.log(response);
|
||||
formData.value.templateId = response.data.templateId;
|
||||
formData.value.code = response.data.templateId;
|
||||
formData.value.remark = response.data.templateUrl;
|
||||
}
|
||||
|
||||
const beforeAvatarUpload = () => {
|
||||
// if (rawFile.type !== 'image/jpeg') {
|
||||
// ElMessage.error('Avatar picture must be JPG format!')
|
||||
// return false
|
||||
// } else if (rawFile.size / 1024 / 1024 > 2) {
|
||||
// ElMessage.error('Avatar picture size can not exceed 2MB!')
|
||||
// return false
|
||||
// }
|
||||
return true
|
||||
const beforeAvatarUpload = (file) => {
|
||||
console.log(file);
|
||||
const isDoc = file.type === 'application/msword' ||
|
||||
file.type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
||||
|
||||
if (!isDoc) {
|
||||
ElMessage.error('只能上传DOC/DOCX格式文件!')
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@ -160,6 +190,7 @@ const onSubmit = () => {
|
||||
}
|
||||
|
||||
if (res.succeeded) {
|
||||
initParam.value.refresh = !initParam.value.refresh;
|
||||
ElMessage.success(dialogTitle.value + '成功');
|
||||
isShowDialog.value = false;
|
||||
} else {
|
||||
@ -177,6 +208,17 @@ const onCancel = () => {
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.avatar-uploader {
|
||||
width: 100%;
|
||||
height: 210px;
|
||||
}
|
||||
|
||||
.el-upload__text {
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
margin-top: 80px;
|
||||
}
|
||||
@ -201,12 +243,10 @@ const onCancel = () => {
|
||||
color: #909399;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<style>
|
||||
.avatar-uploader .el-upload {
|
||||
/* .avatar-uploader .el-upload {
|
||||
border: 1px dashed var(--el-border-color);
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
@ -225,5 +265,5 @@ const onCancel = () => {
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
text-align: center;
|
||||
}
|
||||
} */
|
||||
</style>
|
||||
@ -14,6 +14,9 @@
|
||||
<template #type="scope">
|
||||
{{ scope.row.type == 1 ? '折扣券' : '代金券' }}
|
||||
</template>
|
||||
<template #value="scope">
|
||||
{{ scope.row.type == 1 ? scope.row.value + '%' : scope.row.value + '元' }}
|
||||
</template>
|
||||
<template #startTime="scope">
|
||||
{{ scope.row.startTime }} - {{ scope.row.endTime }}
|
||||
</template>
|
||||
@ -43,8 +46,8 @@
|
||||
<!-- 优惠券类型 -->
|
||||
<el-form-item label="优惠券类型" prop="type">
|
||||
<el-select v-model="formData.type" placeholder="请选择优惠券类型">
|
||||
<el-option label="折扣" value="1"></el-option>
|
||||
<el-option label="定价" value="2"></el-option>
|
||||
<el-option label="折扣" :value="1"></el-option>
|
||||
<el-option label="定价" :value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div class="system-menu-container layout-padding">
|
||||
<ProTable ref="tableRef" :request-api="SysMenuApi.page" :columns="columns" :pagination="false"
|
||||
:tool-button="false">
|
||||
<ProTable ref="tableRef" :request-api="orderPageGet" :columns="columns" :pagination="true"
|
||||
:tool-button="true">
|
||||
<template #tools>
|
||||
<el-button v-auth="'sysmenu:add'" type="primary" icon="ele-Plus" @click="onOpenMenu"> 导出 </el-button>
|
||||
<el-button v-auth="'order:export'" type="primary" icon="ele-Plus" @click="onOpenMenu"> 导出 </el-button>
|
||||
</template>
|
||||
<template #index="scope">
|
||||
{{ scope.$index + 1 }}
|
||||
@ -21,16 +21,7 @@
|
||||
}}</el-tag>
|
||||
</template>
|
||||
<template #action="scope">
|
||||
<!-- <el-button v-auth="'sysmenu:edit'" icon="ele-Edit" size="small" text type="primary"
|
||||
@click="onOpenMenu(scope.row.id)"> 编辑 </el-button>
|
||||
<el-popconfirm title="确认删除吗?" @confirm="onDeleteMenu(scope.row.id)">
|
||||
<template #reference>
|
||||
<el-button v-auth="'sysmenu:delete'" icon="ele-Delete" size="small" text type="danger"> 删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-popconfirm> -->
|
||||
|
||||
<el-button v-auth="'sysmenu:add'" size="small" text type="primary" @click="onOpenMenu(scope.row.id)">
|
||||
<el-button size="small" text type="primary" @click="onOpenMenu(scope.row.id)">
|
||||
查看详情 </el-button>
|
||||
</template>
|
||||
</ProTable>
|
||||
@ -94,16 +85,16 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="sysMenu">
|
||||
<script setup >
|
||||
import { defineAsyncComponent, ref, reactive } from 'vue';
|
||||
import { ElMessage, ElForm } from 'element-plus';
|
||||
import SysMenuApi from '/@/api/SysMenuApi';
|
||||
import { auths } from '/@/utils/authFunction';
|
||||
import ProTable from '/@/components/ProTable/index.vue';
|
||||
import { ColumnProps } from '/@/components/ProTable/interface';
|
||||
import { orderPageGet} from '../../../api/match/order';
|
||||
|
||||
// 定义表单引用类型
|
||||
const formRef = ref<InstanceType<typeof ElForm>>();
|
||||
const formRef = ref();
|
||||
|
||||
const formData = ref({
|
||||
projectName: '30秒单摇',
|
||||
@ -139,29 +130,29 @@ const formRules = ref({
|
||||
]
|
||||
});
|
||||
|
||||
const columns = ref<ColumnProps[]>([
|
||||
{ prop: 'index',label: '订单编号',align: 'center',search: { el: 'input',},},
|
||||
{prop: 'name',label: '单位名称',align: 'center',},
|
||||
{prop: 'type',label: '所属赛事',search: { el: 'input',},},
|
||||
{prop: 'path',label: '订单类型',search: { el: 'select',},enum: [ { label: '全部', value: 0 }, { label: '收款', value: 1 }, { label: '退款', value: 2 },],},
|
||||
{ prop: 'code', label: '关联订单' },
|
||||
{prop: 'pay',label: '支付方式',search: { el: 'select',},enum: [ { label: '全部', value: 0 }, { label: '线上', value: 1 }, { label: '线下', value: 2 },],},
|
||||
{ prop: 'code', label: '付款凭证' },
|
||||
{prop: 'typeRegistration',label: '报名方式',search: { el: 'select',},enum: [ { label: '全部', value: 0 }, { label: '个人', value: 1 }, { label: '团队', value: 2 },],},
|
||||
{ prop: 'code1', label: '报名用户' },
|
||||
{ prop: 'code2', label: '报名账号', search: { el: 'input' } },
|
||||
{ prop: 'num', label: '原金额' },
|
||||
{ prop: 'num1', label: '优惠金额' },
|
||||
{ prop: 'num2', label: '实付金额' },
|
||||
{ prop: 'num3', label: '退款金额' },
|
||||
{ prop: 'time', label: '生成时间', search: { el: 'date-picker', props: { type: 'daterange' } } },
|
||||
{ prop: 'action', label: '操作', align: 'center', fixed: 'right', width: 120, isShow: auths(['sysmenu:add']) },
|
||||
const columns = ref([
|
||||
{ prop: 'orderNo', label: '订单编号', align: 'center', search: { el: 'input', }, fixed: 'left', width: 150 },
|
||||
{ prop: 'unitName', label: '单位名称', align: 'center', },
|
||||
{ prop: 'eventName', label: '所属赛事', search: { el: 'input', }, },
|
||||
{ prop: 'orderType', label: '订单类型', search: { el: 'select', }, enum: [{ label: '全部', value: 0 }, { label: '收款', value: 1 }, { label: '退款', value: 2 },], },
|
||||
{ prop: 'relatedOrderNo', label: '关联订单' },
|
||||
{ prop: 'paymentMethod', label: '支付方式', search: { el: 'select', }, enum: [{ label: '全部', value: 0 }, { label: '线上', value: 1 }, { label: '线下', value: 2 },], },
|
||||
{ prop: 'paymentProofUrl', label: '付款凭证' },
|
||||
{ prop: 'registrationMode', label: '报名方式', search: { el: 'select', }, enum: [{ label: '全部', value: 0 }, { label: '个人', value: 1 }, { label: '团队', value: 2 },], },
|
||||
{ prop: 'contactName', label: '报名用户' },
|
||||
{ prop: 'contactPhone', label: '报名账号', search: { el: 'input' } },
|
||||
{ prop: 'originalAmount', label: '原金额' },
|
||||
{ prop: 'discountAmount', label: '优惠金额' },
|
||||
{ prop: 'actualAmount', label: '实付金额' },
|
||||
{ prop: 'orderStatus', label: '订单状态' },
|
||||
{ prop: 'createdTime', label: '生成时间', search: { el: 'date-picker', props: { type: 'daterange' } } },
|
||||
{ prop: 'action', label: '操作', align: 'center', fixed: 'right', width: 120, },
|
||||
]);
|
||||
|
||||
const isShowDialog = ref(false);
|
||||
const dialogTitle = ref('新增');
|
||||
|
||||
const onOpenMenu = (id: number = 0) => {
|
||||
const onOpenMenu = (id) => {
|
||||
dialogTitle.value = id ? '编辑' : '新增';
|
||||
formData.value = {
|
||||
projectName: '',
|
||||
@ -176,7 +167,7 @@ const onOpenMenu = (id: number = 0) => {
|
||||
};
|
||||
|
||||
//删除菜单
|
||||
const onDeleteMenu = async (id: number) => {
|
||||
const onDeleteMenu = async (id) => {
|
||||
const { succeeded, errors } = await SysMenuApi.delete({ id });
|
||||
if (succeeded) {
|
||||
ElMessage.success('删除成功');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user