优化菜单项,移除无用菜单,优化订单接口参数
This commit is contained in:
@@ -10,15 +10,12 @@ import zhCn from "element-plus/es/locale/lang/zh-cn";
|
||||
import directives from "./instruction/index.js";
|
||||
import "element-plus/dist/index.css";
|
||||
import App from "./App.vue";
|
||||
import "./mock/index.js";
|
||||
import * as ELIcons from "@element-plus/icons-vue";
|
||||
|
||||
import VMdEditor from "@kangc/v-md-editor";
|
||||
import vuepressTheme from "@kangc/v-md-editor/lib/theme/vuepress.js";
|
||||
import "@kangc/v-md-editor/lib/style/base-editor.css";
|
||||
import "@kangc/v-md-editor/lib/theme/style/vuepress.css";
|
||||
|
||||
VMdEditor.use(vuepressTheme);
|
||||
const app = createApp(App);
|
||||
|
||||
// 小图标引用
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
import Mock from "mockjs";
|
||||
|
||||
import {
|
||||
UserList,
|
||||
addUserList,
|
||||
listUpdate,
|
||||
LoginInfo,
|
||||
getMenuList,
|
||||
Newslist,
|
||||
orderLists,
|
||||
homeList,
|
||||
noticeLists,
|
||||
cardlists
|
||||
} from "./permission.js";
|
||||
|
||||
Mock.mock("/permission/LoginInfo", "post", LoginInfo);
|
||||
Mock.mock("/permission/getMenuList", "get", getMenuList);
|
||||
Mock.mock("/permission/UserList", "get", UserList);
|
||||
Mock.mock("/permission/addUserList", "post", addUserList);
|
||||
Mock.mock("/permission/listUpdate", "post", listUpdate);
|
||||
Mock.mock("/permission/Newslist", "get", Newslist);
|
||||
Mock.mock("/permission/orderLists", "get", orderLists);
|
||||
Mock.mock("/permission/homeList", "get", homeList);
|
||||
Mock.mock("/permission/noticeLists", "get", noticeLists);
|
||||
Mock.mock("/permission/cardlists", "get", cardlists);
|
||||
@@ -1,9 +1,4 @@
|
||||
// 引入mockjs
|
||||
import Mock from "mockjs";
|
||||
import {
|
||||
options
|
||||
} from "../views/home/options";
|
||||
const Random = Mock.Random;
|
||||
|
||||
export const menuListItem = [
|
||||
{
|
||||
@@ -104,486 +99,7 @@ export const menuListItem = [
|
||||
url: "/edit",
|
||||
icon: "Edit",
|
||||
},
|
||||
{
|
||||
title: "页面管理",
|
||||
url: "/page",
|
||||
icon: "Checked",
|
||||
children: [{
|
||||
title: "表单页",
|
||||
url: "/form",
|
||||
icon: "Checked",
|
||||
children: [{
|
||||
title: "基础表单",
|
||||
url: "/baseForm",
|
||||
icon: "Menu",
|
||||
},
|
||||
{
|
||||
url: "/stepFrom",
|
||||
title: "步骤表单",
|
||||
icon: "Menu",
|
||||
},
|
||||
{
|
||||
url: "/advancedForm",
|
||||
title: "高级表单",
|
||||
icon: "Menu",
|
||||
},
|
||||
],
|
||||
},
|
||||
// {
|
||||
// url: "/system",
|
||||
// title: "表格管理",
|
||||
// icon: "Grid",
|
||||
// children: [{
|
||||
// url: "/Department",
|
||||
// title: "基础表格",
|
||||
// icon: "Menu",
|
||||
// },
|
||||
// {
|
||||
// url: "/UserList",
|
||||
// title: "内嵌表格",
|
||||
// icon: "Menu",
|
||||
// },
|
||||
// {
|
||||
// url: "/RoleList",
|
||||
// title: "滑动加载",
|
||||
// icon: "Menu",
|
||||
// },
|
||||
// {
|
||||
// url: "/MenuList",
|
||||
// title: "可编辑Table",
|
||||
// icon: "Menu",
|
||||
// },
|
||||
// {
|
||||
// url: "/importExcel",
|
||||
// title: "导入Excel",
|
||||
// icon: "Menu",
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// url: "/goods",
|
||||
// title: "列表页",
|
||||
// icon: "List",
|
||||
// children: [{
|
||||
// url: "/goodCategory",
|
||||
// title: "基础列表",
|
||||
// icon: "Menu",
|
||||
// },
|
||||
// {
|
||||
// url: "/cardList",
|
||||
// title: "卡片列表",
|
||||
// icon: "Menu",
|
||||
// },
|
||||
// {
|
||||
// url: "/searchList",
|
||||
// title: "搜索列表",
|
||||
// icon: "Menu",
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
{
|
||||
url: "/ErrorMessage",
|
||||
title: "异常页面",
|
||||
icon: "WarningFilled",
|
||||
children: [{
|
||||
url: "/404",
|
||||
title: "404",
|
||||
icon: "Menu",
|
||||
},
|
||||
{
|
||||
url: "/500",
|
||||
title: "500",
|
||||
icon: "Menu",
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
title: "图形图表",
|
||||
url: "/echarts",
|
||||
icon: "Histogram",
|
||||
children: [{
|
||||
title: "地图",
|
||||
url: "/echarts/map",
|
||||
icon: "Menu",
|
||||
children: [{
|
||||
url: "/baidumap",
|
||||
title: "百度地图",
|
||||
icon: "Menu",
|
||||
},
|
||||
// {
|
||||
// url: "/gaodemap",
|
||||
// title: "高德地图",
|
||||
// icon: "Menu",
|
||||
// },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "雷达图",
|
||||
url: "/radar",
|
||||
icon: "Menu",
|
||||
},
|
||||
{
|
||||
title: "柱状图",
|
||||
url: "/histogram",
|
||||
icon: "Menu",
|
||||
},
|
||||
{
|
||||
title: "折线图",
|
||||
url: "/line",
|
||||
icon: "Menu",
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
url: "/able",
|
||||
title: "功能",
|
||||
icon: "HelpFilled",
|
||||
children: [{
|
||||
url: "/watermark",
|
||||
title: "水印",
|
||||
icon: "Menu",
|
||||
},
|
||||
{
|
||||
url: "/countTo",
|
||||
title: "数字动画",
|
||||
icon: "Menu",
|
||||
},
|
||||
{
|
||||
url: "/batchImport",
|
||||
title: "图片上传",
|
||||
icon: "Menu",
|
||||
},
|
||||
{
|
||||
url: "/fileImport",
|
||||
title: "文件上传",
|
||||
icon: "Menu",
|
||||
},
|
||||
{
|
||||
url: "markdown",
|
||||
icon: "Platform",
|
||||
title: "编辑器",
|
||||
children: [{
|
||||
url: "/wangEditor",
|
||||
title: "富文本编辑器",
|
||||
icon: "Menu",
|
||||
},
|
||||
{
|
||||
url: "/markdown",
|
||||
title: "markdown",
|
||||
icon: "Menu",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
url: "/strength",
|
||||
title: "密码强度",
|
||||
icon: "Menu",
|
||||
},
|
||||
{
|
||||
url: "/validation",
|
||||
title: "验证组件",
|
||||
icon: "Menu",
|
||||
},
|
||||
{
|
||||
url: "/guide",
|
||||
title: "引导页",
|
||||
icon: "Menu",
|
||||
},
|
||||
{
|
||||
url: "/embedded",
|
||||
title: "内嵌页",
|
||||
icon: "Menu",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
url: "/directives",
|
||||
title: "自定义指令",
|
||||
icon: "Stamp",
|
||||
children: [{
|
||||
url: "/copy",
|
||||
title: "复制",
|
||||
icon: "Menu",
|
||||
},
|
||||
{
|
||||
url: "/Drag",
|
||||
title: "拖拽",
|
||||
icon: "Menu",
|
||||
},
|
||||
{
|
||||
url: "/debounceDirect",
|
||||
title: "防抖指令",
|
||||
icon: "Menu",
|
||||
},
|
||||
{
|
||||
url: "/throttle",
|
||||
title: "节流指令",
|
||||
icon: "Menu",
|
||||
},
|
||||
{
|
||||
url: "/longPress",
|
||||
title: "长按指令",
|
||||
icon: "Menu",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
url: "/flow",
|
||||
title: "图形编辑器",
|
||||
icon: "BrushFilled",
|
||||
//
|
||||
children: [{
|
||||
url: "/flowCat",
|
||||
title: "流程图",
|
||||
icon: "Menu",
|
||||
}, ],
|
||||
},
|
||||
{
|
||||
url: "/video",
|
||||
title: "视频播放器",
|
||||
icon: "VideoCameraFilled",
|
||||
//
|
||||
children: [{
|
||||
url: "/video",
|
||||
title: "视频播放器",
|
||||
icon: "Menu",
|
||||
}, ],
|
||||
},
|
||||
{
|
||||
url: "/DataReport",
|
||||
title: "数据统计",
|
||||
icon: "TrendCharts",
|
||||
|
||||
children: [{
|
||||
url: "/demo1",
|
||||
title: "项目一",
|
||||
icon: "Menu",
|
||||
}, ],
|
||||
},
|
||||
// {
|
||||
// url: "/material",
|
||||
// title: "素材中心",
|
||||
// icon: "PictureFilled",
|
||||
// children: [{
|
||||
// url: "/materialIndex",
|
||||
// title: "素材管理",
|
||||
// icon: "Menu",
|
||||
// }, ],
|
||||
// },
|
||||
{
|
||||
url: "/user",
|
||||
title: "个人中心",
|
||||
icon: "Avatar",
|
||||
children: [{
|
||||
url: "/user",
|
||||
title: "关于我",
|
||||
icon: "Menu",
|
||||
}, ],
|
||||
},
|
||||
];
|
||||
|
||||
export const LoginInfo = (options) => {
|
||||
console.log(options, "接收post参数");
|
||||
const {
|
||||
username,
|
||||
password
|
||||
} = JSON.parse(options.body);
|
||||
if (username == "admin" && password != "123456") {
|
||||
return {
|
||||
code: "-200",
|
||||
data: {
|
||||
message: "用户不存在",
|
||||
},
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
code: "200",
|
||||
data: {
|
||||
user_id: Random.id(),
|
||||
name: Random.cname(),
|
||||
token: Random.guid(),
|
||||
image: "https://img2.baidu.com/it/u=2859542338,3761174075&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1660064400&t=6fe6057370cbe369654ff2e132d02a37",
|
||||
},
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
export const getMenuList = (options) => {
|
||||
const obj = JSON.parse(options.body);
|
||||
return {
|
||||
code: 200,
|
||||
data: {
|
||||
menuList: menuList,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
// 用户列表
|
||||
let userList = [];
|
||||
for (let index = 0; index < 50; index++) {
|
||||
let obj = {
|
||||
id: Random.id(),
|
||||
username: Random.cname(),
|
||||
email: Random.email(),
|
||||
date: Random.date(),
|
||||
address: Random.city(true),
|
||||
content: Random.csentence(),
|
||||
};
|
||||
userList.push(obj);
|
||||
}
|
||||
const param2Obj = (url) => {
|
||||
let obj = JSON.parse(url);
|
||||
let page = obj.page;
|
||||
console.log(page);
|
||||
return page;
|
||||
};
|
||||
|
||||
export const UserList = (options) => {
|
||||
const currentPage = param2Obj(options.body);
|
||||
let cameraData = userList.filter((item, index) => {
|
||||
return index >= (currentPage - 1) * 10 && index < currentPage * 10;
|
||||
});
|
||||
return {
|
||||
code: 200,
|
||||
data: {
|
||||
total: userList.length,
|
||||
userList: cameraData,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export const addUserList = (options) => {
|
||||
console.log("传过来的数据" + JSON.parse(options.body));
|
||||
let obj = JSON.parse(options.body);
|
||||
obj.id = Random.id();
|
||||
userList.unshift(obj); // 将前台返回来的数据,拼接到数组中。
|
||||
return {
|
||||
data: userList,
|
||||
id: obj.id,
|
||||
};
|
||||
};
|
||||
|
||||
// 数据的修改操作
|
||||
export const listUpdate = (options) => {
|
||||
let obj = JSON.parse(options.body);
|
||||
userList = userList.map((val) => {
|
||||
return val.id == obj.id ? obj : val;
|
||||
});
|
||||
return {
|
||||
data: userList,
|
||||
};
|
||||
};
|
||||
|
||||
export const Newslist = (options) => {
|
||||
let obj = JSON.parse(options.body);
|
||||
let newList = [];
|
||||
for (let i = 0; i < 10; i++) {
|
||||
let item = {
|
||||
title: Random.csentence(5, 8), // Random.csentence( min, max )
|
||||
notifyPic: Random.dataImage("300x250", "mock的图片"), // Random.dataImage( size, text ) 生成一段随机的 Base64 图片编码
|
||||
notifyType: Random.integer(1, 3), //随机生成1-3的Integer
|
||||
isTop: Random.integer(1, 2), //随机生成1-2的Integer
|
||||
createUser: Random.cname(), // Random.cname() 随机生成一个常见的中文姓名
|
||||
email: Random.email(),
|
||||
number: '$' + Random.integer(100, 5000) + '.00',
|
||||
createTime: Random.date() + " " + Random.time(),
|
||||
pay_state: '100' + Random.integer(1, 3),
|
||||
};
|
||||
newList.push(item);
|
||||
}
|
||||
return {
|
||||
data: newList,
|
||||
};
|
||||
};
|
||||
export const orderLists = (options) => {
|
||||
let obj = JSON.parse(options.body);
|
||||
let orderList = [];
|
||||
for (let i = 0; i < 60; i++) {
|
||||
let item = {
|
||||
goodsId: i,
|
||||
code: Random.guid(),
|
||||
title: Random.ctitle(4, 5),
|
||||
commodity: "10010" + i,
|
||||
goodsname: Random.cword(2, 6), // Random.csentence( min, max )
|
||||
brand: Random.cword(2, 4),
|
||||
sku: "1ml", // Random.dataImage( size, text ) 生成一段随机的 Base64 图片编码
|
||||
inventory: Random.integer(10, 100),
|
||||
number: Random.integer(100, 5000), //100到5000的随机整数
|
||||
costPrice: Random.integer(10, 20),
|
||||
amount: Random.integer(100, 200), //100到5000的随机整数
|
||||
itemEdit: false,
|
||||
ItemData: [{
|
||||
address: Random.city(true),
|
||||
email: Random.email(),
|
||||
state: Random.boolean(),
|
||||
salenumber: Random.integer(10, 100),
|
||||
receivable: Random.integer(10, 100),
|
||||
}, ],
|
||||
};
|
||||
orderList.push(item);
|
||||
}
|
||||
|
||||
return {
|
||||
total: 60,
|
||||
data: obj.size == 10 ? orderList.slice(obj.size * obj.page - obj.size, obj.size * obj.page) : orderList,
|
||||
};
|
||||
};
|
||||
|
||||
export const homeList = (options) => {
|
||||
let homeList = [];
|
||||
for (let index = 0; index < 10; index++) {
|
||||
let obj = {
|
||||
name: "限时秒杀",
|
||||
title_id: Random.integer(0, 10) + "id",
|
||||
type: Random.boolean(),
|
||||
number: Random.integer(10, 100),
|
||||
order_number: Random.integer(100, 1000),
|
||||
GWV_number: Random.integer(100, 5000),
|
||||
state: Random.boolean(),
|
||||
};
|
||||
homeList.push(obj);
|
||||
}
|
||||
|
||||
return {
|
||||
data: homeList,
|
||||
};
|
||||
};
|
||||
|
||||
export const noticeLists = (options) => {
|
||||
let noticeLists = [];
|
||||
for (let index = 0; index < 10; index++) {
|
||||
let item = {
|
||||
text: Random.csentence(),
|
||||
};
|
||||
noticeLists.push(item);
|
||||
}
|
||||
return {
|
||||
data: noticeLists,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
export const cardlists = (options) => {
|
||||
let obj = JSON.parse(options.body);
|
||||
let cardlists = [];
|
||||
for (let i = 0; i < 50; i++) {
|
||||
let item = {
|
||||
title: Random.csentence(5, 8), // Random.csentence( min, max )
|
||||
user_name: Random.cname(), // Random.cname() 随机生成一个常见的中文姓名
|
||||
email: Random.email(),
|
||||
number: '$' + Random.integer(100, 5000) + '.00',
|
||||
date: Random.date(),
|
||||
pay_state: '100' + Random.integer(1, 3),
|
||||
content: Random.csentence(),
|
||||
|
||||
};
|
||||
cardlists.push(item);
|
||||
}
|
||||
return {
|
||||
data: cardlists,
|
||||
};
|
||||
};
|
||||
@@ -231,98 +231,6 @@ const routerList = [
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
path: "/form",
|
||||
name: "form",
|
||||
component: Layout,
|
||||
meta: {
|
||||
name: "表单页",
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/baseForm",
|
||||
name: "baseForm",
|
||||
component: () => import("../views/form/baseForm.vue"),
|
||||
meta: {
|
||||
requiresAuth: true, //有一些页面是否登录才能进去
|
||||
name: "基础表单",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/stepFrom",
|
||||
name: "stepFrom",
|
||||
component: () => import("../views/form/stepFrom.vue"),
|
||||
meta: {
|
||||
requiresAuth: true, //有一些页面是否登录才能进去
|
||||
name: "分页表单",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/advancedForm",
|
||||
name: "advancedForm",
|
||||
component: () => import("../views/form/advancedForm.vue"),
|
||||
meta: {
|
||||
requiresAuth: true, //有一些页面是否登录才能进去
|
||||
name: "高级表单",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/system2",
|
||||
name: "system2",
|
||||
component: Layout,
|
||||
meta: {
|
||||
name: "系统管理",
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/Department",
|
||||
name: "Department",
|
||||
component: () => import("../views/system/Department/index.vue"),
|
||||
meta: {
|
||||
requiresAuth: true, //有一些页面是否登录才能进去
|
||||
name: "基础表格",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/UserList",
|
||||
name: "UserList",
|
||||
component: () => import("../views/system/UserList/index.vue"),
|
||||
meta: {
|
||||
requiresAuth: true, //有一些页面是否登录才能进去
|
||||
name: "内嵌表格",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/RoleList",
|
||||
name: "RoleList",
|
||||
component: () => import("../views/system/RoleList/index.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "滑动加载",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/MenuList",
|
||||
name: "MenuList",
|
||||
component: () => import("../views/system/MenuList/index.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "可编辑Table",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/importExcel",
|
||||
name: "importExcel",
|
||||
component: () => import("../views/system/Excel/importExcel.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "Excel",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/ErrorMessage",
|
||||
name: "ErrorMessage",
|
||||
@@ -351,329 +259,7 @@ const routerList = [
|
||||
},
|
||||
],
|
||||
},
|
||||
// {
|
||||
// path: "/goods",
|
||||
// name: "goods",
|
||||
// component: Layout,
|
||||
// meta: {
|
||||
// name: "列表页",
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: "/goodCategory",
|
||||
// name: "goodCategory",
|
||||
// component: () => import("../views/goods/goodCategory.vue"),
|
||||
// meta: {
|
||||
// requiresAuth: true, //有一些页面是否登录才能进去
|
||||
// name: "基础列表",
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "/cardList",
|
||||
// name: "cardList",
|
||||
// component: () => import("../views/goods/cardList.vue"),
|
||||
// meta: {
|
||||
// requiresAuth: true, //有一些页面是否登录才能进去
|
||||
// name: "卡片列表",
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "/searchList",
|
||||
// name: "searchList",
|
||||
// component: () => import("../views/goods/searchList.vue"),
|
||||
// meta: {
|
||||
// requiresAuth: true, //有一些页面是否登录才能进去
|
||||
// name: "搜索列表",
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
{
|
||||
path: "/able",
|
||||
name: "able",
|
||||
component: Layout,
|
||||
meta: {
|
||||
name: "功能",
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/watermark",
|
||||
name: "watermark",
|
||||
component: () => import("../views/able/watermark.vue"),
|
||||
meta: {
|
||||
requiresAuth: true, //有一些页面是否登录才能进去
|
||||
name: "水印",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/countTo",
|
||||
name: "countTo",
|
||||
component: () => import("../views/able/countTo.vue"),
|
||||
meta: {
|
||||
requiresAuth: true, //有一些页面是否登录才能进去
|
||||
name: "数字动画",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/batchImport",
|
||||
name: "batchImport",
|
||||
component: () => import("../views/able/batchImport.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "图片上传",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/fileImport",
|
||||
name: "fileImport",
|
||||
component: () => import("../views/able/fileImport.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "文件上传",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/wangEditor",
|
||||
name: "wangEditor",
|
||||
component: () => import("../views/able/wangEditor.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "富文本编辑器",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/markdown",
|
||||
name: "markdown",
|
||||
component: () => import("../views/able/markdown.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "markdown",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/strength",
|
||||
name: "strength",
|
||||
component: () => import("../views/able/strength.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "密码强度",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/validation",
|
||||
name: "validation",
|
||||
component: () => import("../views/able/validation.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "验证组件",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/guide",
|
||||
name: "guide",
|
||||
component: () => import("../views/able/guide.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "引导页",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/embedded",
|
||||
name: "embedded",
|
||||
component: () => import("../views/able/embedded.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "内嵌页",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/flow",
|
||||
name: "flow",
|
||||
component: Layout,
|
||||
meta: {
|
||||
name: "图形编辑器",
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/flowCat",
|
||||
name: "flowCat",
|
||||
component: () => import("../views/flow/flowCat.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "流程图",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/echarts",
|
||||
name: "echarts",
|
||||
component: Layout,
|
||||
meta: {
|
||||
name: "图表",
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/baidumap",
|
||||
name: "baidumap",
|
||||
component: () => import("../views/echarts/map/baidumap.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "百度地图",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/gaodemap",
|
||||
name: "gaodemap",
|
||||
component: () => import("../views/echarts/map/gaodemap.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "高德地图",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/histogram",
|
||||
name: "histogram",
|
||||
component: () => import("../views/echarts/histogram.vue"),
|
||||
mate: {
|
||||
requiresAuth: true,
|
||||
name: "柱状图",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/line",
|
||||
name: "line",
|
||||
component: () => import("../views/echarts/line.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "折线图",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/radar",
|
||||
name: "radar",
|
||||
component: () => import("../views/echarts/radar.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "雷达图",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/video",
|
||||
name: "video",
|
||||
component: Layout,
|
||||
meta: {
|
||||
name: "视频播放器",
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/video",
|
||||
name: "video",
|
||||
component: () => import("../views/video/index.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "视频播放器",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/DataReport",
|
||||
name: "DataReport",
|
||||
component: Layout,
|
||||
meta: {
|
||||
name: "数据统计",
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/demo1",
|
||||
name: "demo1",
|
||||
component: () => import("../views/DataReport/demo1.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "项目一",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/material",
|
||||
name: "material",
|
||||
component: Layout,
|
||||
meta: {
|
||||
name: "素材管理",
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/materialIndex",
|
||||
name: "materialIndex",
|
||||
component: () => import("../views/material/materialIndex.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "素材管理",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/directives",
|
||||
name: "directives",
|
||||
component: Layout,
|
||||
meta: {
|
||||
name: "自定义指令",
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/Drag",
|
||||
name: "Drag",
|
||||
component: () => import("../views/directives/Drag.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "拖拽",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/throttle",
|
||||
name: "throttle",
|
||||
component: () => import("../views/directives/throttle.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "节流",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/copy",
|
||||
name: "copy",
|
||||
component: () => import("../views/directives/copy.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "复制",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/debounceDirect",
|
||||
name: "debounceDirect",
|
||||
component: () => import("../views/directives/debounceDirect.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "防抖",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/longPress",
|
||||
name: "longPress",
|
||||
component: () => import("../views/directives/longPress.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
name: "长按指令",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
|
||||
];
|
||||
export default routerList;
|
||||
|
||||
+92
-131
@@ -1,95 +1,70 @@
|
||||
<template>
|
||||
<el-card>
|
||||
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="4">
|
||||
<el-card>
|
||||
<el-form :inline="true" :model="formSearch" class="demo-form-inline">
|
||||
<el-form-item label="服务项目">
|
||||
<el-input
|
||||
v-model="searchName"
|
||||
style="max-width: 300px"
|
||||
placeholder="服务项目"
|
||||
placeholder="请输入服务项目"
|
||||
class="input-with-select"
|
||||
onchange="searchEvnt"
|
||||
>
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<template #append>
|
||||
<el-button type="success" @click="searchEvnt">查询</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4">
|
||||
<el-form-item label="订单编号">
|
||||
<el-input
|
||||
v-model="searchName"
|
||||
style="max-width: 300px"
|
||||
placeholder="订单编号"
|
||||
class="input-with-select"
|
||||
onchange="searchEvnt"
|
||||
>
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<template #append>
|
||||
<el-button type="success" @click="searchEvnt">查询</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4">
|
||||
<el-select v-model="ruleForm" placeholder="订单状态">
|
||||
<el-option label="全部" value="" />
|
||||
<el-form-item label="订单状态">
|
||||
<el-select v-model="isStatus" placeholder="订单状态" style="width: 200px">
|
||||
<el-option label="全部" value=" " />
|
||||
<el-option label="待付款" value="0" />
|
||||
<el-option label="已付款" value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4">
|
||||
<el-form-item label="维修费用">
|
||||
<el-input
|
||||
v-model="searchName"
|
||||
style="max-width: 300px"
|
||||
placeholder="维修费用"
|
||||
class="input-with-select"
|
||||
onchange="searchEvnt"
|
||||
>
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<template #append>
|
||||
<el-button type="success" @click="searchEvnt">查询</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4">
|
||||
<el-form-item label="用户昵称">
|
||||
<el-input
|
||||
v-model="searchName"
|
||||
style="max-width: 300px"
|
||||
placeholder="用户昵称"
|
||||
class="input-with-select"
|
||||
onchange="searchEvnt"
|
||||
>
|
||||
|
||||
<template #append>
|
||||
<el-button type="success" @click="searchEvnt">查询</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSearchSubmit">搜索</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10">
|
||||
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tableData"
|
||||
:default-sort="{ prop: 'date', order: 'descending' }"
|
||||
:header-cell-style="{ backgroundColor: '#ecf5ff' }"
|
||||
border
|
||||
stripe
|
||||
style="width: 100%"
|
||||
>
|
||||
|
||||
<el-table-column
|
||||
label="编号"
|
||||
prop="userId"
|
||||
prop="id"
|
||||
width="120"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
@@ -98,16 +73,21 @@
|
||||
|
||||
<el-table-column
|
||||
label="状态"
|
||||
prop="userId"
|
||||
prop="status"
|
||||
width="120"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
sortable
|
||||
/>
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-tag type="info" v-if="scope.row.status === 0">待服务</el-tag>
|
||||
<el-tag type="warning" v-if="scope.row.status === 1">服务中</el-tag>
|
||||
<el-tag type="danger" v-if="scope.row.status === 2">待付款 </el-tag>
|
||||
<el-tag type="success" v-if="scope.row.status === 3">已完成</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="服务项目"
|
||||
prop="userId"
|
||||
prop="goodsName"
|
||||
width="120"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
@@ -116,8 +96,7 @@
|
||||
|
||||
<el-table-column
|
||||
label="预约时间"
|
||||
prop="userId"
|
||||
width="120"
|
||||
prop="appointmentTime"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
sortable
|
||||
@@ -125,16 +104,19 @@
|
||||
|
||||
<el-table-column
|
||||
label="维修费用"
|
||||
prop="userId"
|
||||
width="120"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
sortable
|
||||
/>
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ formatPrice(scope.row.amount) }}元
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="微信昵称"
|
||||
prop="name"
|
||||
prop="username"
|
||||
width="300"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
@@ -149,7 +131,7 @@
|
||||
|
||||
<el-table-column
|
||||
label="下单时间"
|
||||
prop="date"
|
||||
prop="createTime"
|
||||
width="auto"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
@@ -167,14 +149,14 @@
|
||||
|
||||
<el-table-column label="操作" width="280px" align="center">
|
||||
<template v-slot:default="scope">
|
||||
<el-button type="info" @click="drawer = true">详情</el-button>
|
||||
<el-button type="danger">退款</el-button>
|
||||
<el-button type="info" @click="detail(scope.row)">详情</el-button>
|
||||
<!-- <el-button type="danger">退款</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<el-pagination
|
||||
small
|
||||
size="small"
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="tableData.length"
|
||||
@@ -182,7 +164,7 @@
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
|
||||
<el-drawer v-model="drawer" :direction="direction">
|
||||
<el-drawer v-model="drawer">
|
||||
<template #header>
|
||||
<h4>订单详情</h4>
|
||||
</template>
|
||||
@@ -203,7 +185,7 @@
|
||||
订单编号
|
||||
</div>
|
||||
</template>
|
||||
20111116171087
|
||||
{{detailData.id}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
@@ -212,7 +194,7 @@
|
||||
预约时间
|
||||
</div>
|
||||
</template>
|
||||
2024-01-01 12:00:00
|
||||
{{detailData.appointmentTime}}
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
@@ -222,7 +204,7 @@
|
||||
预约费用
|
||||
</div>
|
||||
</template>
|
||||
0.00元
|
||||
{{ formatPrice(detailData.goodsPrice) }}元
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
@@ -231,7 +213,7 @@
|
||||
报价费用
|
||||
</div>
|
||||
</template>
|
||||
8102.01元
|
||||
{{ formatPrice(detailData.amount) }}元
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
@@ -240,7 +222,10 @@
|
||||
订单状态
|
||||
</div>
|
||||
</template>
|
||||
未付款
|
||||
<el-tag type="info" v-if="detailData.status === 0">待服务</el-tag>
|
||||
<el-tag type="warning" v-if="detailData.status === 1">服务中</el-tag>
|
||||
<el-tag type="danger" v-if="detailData.status === 2">待付款 </el-tag>
|
||||
<el-tag type="success" v-if="detailData.status === 3">已完成</el-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
@@ -252,10 +237,10 @@
|
||||
border
|
||||
style="margin-bottom: 20px"
|
||||
>
|
||||
<el-descriptions-item label="微信昵称">kooriookami</el-descriptions-item>
|
||||
<el-descriptions-item label="联系电话">188****1111</el-descriptions-item>
|
||||
<el-descriptions-item label="微信昵称">{{ detailData.username }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系电话">{{ detailData.mobile }}</el-descriptions-item>
|
||||
<el-descriptions-item label="地址">
|
||||
重庆市南岸区星光花园小区8号楼602
|
||||
{{ detailData.address }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
@@ -268,9 +253,9 @@
|
||||
style="margin-bottom: 20px"
|
||||
>
|
||||
|
||||
<el-descriptions-item label="名字">张三</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">18100000000</el-descriptions-item>
|
||||
<el-descriptions-item label="预约时间">2024-10-11 15:00:01</el-descriptions-item>
|
||||
<el-descriptions-item label="名字">{{ detailData.surveyorsName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">{{ detailData.surveyorsMobile }}</el-descriptions-item>
|
||||
<el-descriptions-item label="预约时间">{{ detailData.appointmentTime }}</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
|
||||
@@ -283,14 +268,14 @@
|
||||
style="margin-bottom: 20px"
|
||||
>
|
||||
|
||||
<el-descriptions-item label="名字">李四</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">18100000000</el-descriptions-item>
|
||||
<el-descriptions-item label="预约时间">2024-10-11 15:00:01</el-descriptions-item>
|
||||
<el-descriptions-item label="名字">{{ detailData.repairerName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">{{ detailData.repairerMobile }}</el-descriptions-item>
|
||||
<el-descriptions-item label="预约时间">{{ detailData.repairerName }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<div style="display: flex;justify-content: flex-end;margin-top: 50px">
|
||||
<el-button @click="cancelClick">取消</el-button>
|
||||
<el-button type="danger" @click="confirmClick">退款</el-button>
|
||||
<el-button @click="drawer = false">取消</el-button>
|
||||
<!-- <el-button type="danger" @click="confirmClick">退款</el-button>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -298,33 +283,17 @@
|
||||
</el-card>
|
||||
</template>
|
||||
<script setup>
|
||||
import * as XLSX from 'xlsx'
|
||||
import {
|
||||
Edit,
|
||||
Delete,
|
||||
InfoFilled,
|
||||
View,
|
||||
ArrowDownBold,
|
||||
Plus,
|
||||
} from '@element-plus/icons-vue'
|
||||
import {nextTick, onMounted, reactive, ref} from 'vue'
|
||||
|
||||
// 示例数据
|
||||
// import {options} from './options.js'
|
||||
import {nextTick, onMounted, reactive, ref} from 'vue'
|
||||
import {getOrderList} from "../../api/modules/order";
|
||||
|
||||
const tableData = ref([])
|
||||
const dataList = ref([])
|
||||
const table = ref()
|
||||
const tabclickIndex = ref()
|
||||
const isExpand = ref(false)
|
||||
// 示例数据加载
|
||||
// const exampleData = ref(JSON.parse(JSON.stringify(options)))
|
||||
|
||||
const disabled = ref(false)
|
||||
const dialogVisible = ref(false)
|
||||
const total = ref(0)
|
||||
const formInline = ref({})
|
||||
const registerDate = ref('');
|
||||
|
||||
const searchName = ref('');
|
||||
const drawer = ref(false)
|
||||
const queryData = ref({
|
||||
@@ -333,52 +302,44 @@ const queryData = ref({
|
||||
size: 10,
|
||||
})
|
||||
|
||||
const detailData = ref();
|
||||
|
||||
const isStatus = ref('');
|
||||
|
||||
// 初始化数据
|
||||
const initData = () => {
|
||||
// 示例数据加载
|
||||
// tableData.value = exampleData.value;
|
||||
|
||||
getOrderList(queryData.value).then((res) => {
|
||||
console.log(res.data)
|
||||
tableData.value = res.data.records
|
||||
total.value = res.data.total
|
||||
tableData.value = res.data
|
||||
})
|
||||
}
|
||||
const itemEditHanld = (item) => {
|
||||
item.itemEdit = !item.itemEdit
|
||||
// // console.log(JSON.stringify(item));
|
||||
// tabclickIndex.value = item;
|
||||
|
||||
// 格式化价格
|
||||
const formatPrice = (price) => {
|
||||
|
||||
price = price == null ? price = 0 : price;
|
||||
|
||||
return parseFloat(price).toFixed(2);
|
||||
}
|
||||
const handleSizeChange = (val) => {
|
||||
console.log(val)
|
||||
}
|
||||
const handleSelectionChange = (val) => {
|
||||
|
||||
|
||||
// 订单详情
|
||||
const detail = (row) => {
|
||||
drawer.value = true
|
||||
detailData.value = { ...row }
|
||||
|
||||
console.log('detailData', detailData.value);
|
||||
}
|
||||
|
||||
const handleCurrentChange = (val) => {
|
||||
queryData.value.size = 10
|
||||
queryData.value.page = val
|
||||
initData(queryData.value)
|
||||
}
|
||||
const handleClose = () => {
|
||||
}
|
||||
const dialogVisibleHanle = () => {
|
||||
console.log('滑动加载')
|
||||
}
|
||||
const handleExpand = () => {
|
||||
isExpand.value = false
|
||||
tableData.value.forEach((item) => {
|
||||
table.value.toggleRowExpansion(item, isExpand.value)
|
||||
})
|
||||
}
|
||||
|
||||
const handleOpen = () => {
|
||||
isExpand.value = true
|
||||
tableData.value.forEach((item) => {
|
||||
table.value.toggleRowExpansion(item, isExpand.value)
|
||||
})
|
||||
}
|
||||
|
||||
// 搜索事件
|
||||
const searchEvnt = ()=> {
|
||||
const onSearchSubmit = ()=> {
|
||||
console.log('点击搜索');
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<script setup>
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
</el-table>
|
||||
<el-pagination
|
||||
small
|
||||
size="small"
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="tableData.length"
|
||||
|
||||
Reference in New Issue
Block a user