diff --git a/.env.development b/.env.development
index 4f4ab51..e1223e0 100644
--- a/.env.development
+++ b/.env.development
@@ -8,16 +8,16 @@ VITE_OPEN = true
ENV = 'development'
# ADMIN 服务地址
-# VITE_ADMIN_PROXY_PATH = http://123.156.230.15:8089/api/ # 线上
+VITE_ADMIN_PROXY_PATH = http://123.156.230.15:8089/api/ # 线上
# VITE_ADMIN_PROXY_PATH = http://pjcloud.center.takin.cc/
# VITE_ADMIN_PROXY_PATH = http://localhost:9999/
-VITE_ADMIN_PROXY_PATH = http://192.168.101.29:9999/ # 邓-本地
+# VITE_ADMIN_PROXY_PATH = http://192.168.101.29:9999/ # 邓-本地
# 图片访问基础地址
-# VITE_IMAGE_BASE_PATH = http://123.156.230.15:8089/api # 线上
+VITE_IMAGE_BASE_PATH = http://123.156.230.15:8089/api # 线上
# VITE_IMAGE_BASE_PATH = http://pjcloud.center.takin.cc
# VITE_IMAGE_BASE_PATH = http://localhost:9999
-VITE_IMAGE_BASE_PATH = http://192.168.101.29:9999 # 邓-本地
+# VITE_IMAGE_BASE_PATH = http://192.168.101.29:9999 # 邓-本地
# 代码生成服务地址
VITE_GEN_PROXY_PATH = http://192.168.110.156:5003
diff --git a/src/api/canteen/canteenDailyMenu.ts b/src/api/canteen/canteenDailyMenu.ts
index 8a2d58d..b703539 100644
--- a/src/api/canteen/canteenDailyMenu.ts
+++ b/src/api/canteen/canteenDailyMenu.ts
@@ -1,67 +1,66 @@
import request from "/@/utils/request"
export function fetchList(query?: Object) {
- return request({
- url: '/canteen/canteenDailyMenu/page',
- method: 'get',
- params: query
- })
+ return request({
+ url: "/canteen/canteenDailyMenu/page",
+ method: "get",
+ params: query,
+ })
}
export function addObj(obj?: Object) {
- return request({
- url: '/canteen/canteenDailyMenu',
- method: 'post',
- data: obj
- })
+ return request({
+ url: "/canteen/canteenDailyMenu",
+ method: "post",
+ data: obj,
+ })
}
export function getObj(id?: string) {
- return request({
- url: '/canteen/canteenDailyMenu/' + id,
- method: 'get'
- })
+ return request({
+ url: "/canteen/canteenDailyMenu/" + id,
+ method: "get",
+ })
}
-export function delObjs(ids?: Object) {
- return request({
- url: '/canteen/canteenDailyMenu',
- method: 'delete',
- data: ids
- })
+export function delObjs(data?: Object) {
+ return request({
+ url: "/canteen/canteenDailyMenu",
+ method: "delete",
+ data,
+ })
}
export function putObj(obj?: Object) {
- return request({
- url: '/canteen/canteenDailyMenu',
- method: 'put',
- data: obj
- })
+ return request({
+ url: "/canteen/canteenDailyMenu",
+ method: "put",
+ data: obj,
+ })
}
export function selectFoodList(query?: Object) {
- return request({
- url: '/canteen/canteenDailyMenu/selectFoodList',
- method: 'get',
- params: query
- })
+ return request({
+ url: "/canteen/canteenDailyMenu/selectFoodList",
+ method: "get",
+ params: query,
+ })
}
//时间生成
export function selectWeekInfo(query?: Object) {
- return request({
- url: '/canteen/canteenDailyMenu/selectWeekInfo',
- method: 'get',
- params: query
- })
+ return request({
+ url: "/canteen/canteenDailyMenu/selectWeekInfo",
+ method: "get",
+ params: query,
+ })
}
// //获取当前选中的菜品信息
export function selectTimeFoodApi(query?: Object) {
- return request({
- url: '/canteen/canteenDailyMenu/selectTimeFood',
- method: 'get',
- params: query
- })
+ return request({
+ url: "/canteen/canteenDailyMenu/selectTimeFood",
+ method: "get",
+ params: query,
+ })
}
-
diff --git a/src/components/Select/SelectCtcg.vue b/src/components/Select/SelectCtcg.vue
index 412d0d3..20db09d 100644
--- a/src/components/Select/SelectCtcg.vue
+++ b/src/components/Select/SelectCtcg.vue
@@ -25,61 +25,61 @@
diff --git a/src/components/Select/SelectCtcgd.vue b/src/components/Select/SelectCtcgol.vue
similarity index 68%
rename from src/components/Select/SelectCtcgd.vue
rename to src/components/Select/SelectCtcgol.vue
index c48a8a5..9d526fc 100644
--- a/src/components/Select/SelectCtcgd.vue
+++ b/src/components/Select/SelectCtcgol.vue
@@ -25,61 +25,61 @@
diff --git a/src/components/index.ts b/src/components/index.ts
index 5d54803..15dfe9b 100644
--- a/src/components/index.ts
+++ b/src/components/index.ts
@@ -1,79 +1,79 @@
-import Pagination from '/@/components/Pagination/index.vue';
-import RightToolbar from '/@/components/RightToolbar/index.vue';
-import DictTag from '/@/components/DictTag/index.vue';
-import DictSelect from '/@/components/DictSelect/index.vue';
-import UploadExcel from '/@/components/Upload/Excel.vue';
-import UploadFile from '/@/components/Upload/index.vue';
-import UploadImg from '/@/components/Upload/Image.vue';
-import UploadImgs from '/@/components/Upload/Images.vue';
-import DelWrap from '/@/components/DelWrap/index.vue';
-import Editor from '/@/components/Editor/index.vue';
-import Tip from '/@/components/Tip/index.vue';
-import TagList from '/@/components/TagList/index.vue';
-import SvgIcon from '/@/components/SvgIcon/index.vue';
-import PreviewImage from '/@/components/PreviewImage/index.vue';
+import Pagination from "/@/components/Pagination/index.vue"
+import RightToolbar from "/@/components/RightToolbar/index.vue"
+import DictTag from "/@/components/DictTag/index.vue"
+import DictSelect from "/@/components/DictSelect/index.vue"
+import UploadExcel from "/@/components/Upload/Excel.vue"
+import UploadFile from "/@/components/Upload/index.vue"
+import UploadImg from "/@/components/Upload/Image.vue"
+import UploadImgs from "/@/components/Upload/Images.vue"
+import DelWrap from "/@/components/DelWrap/index.vue"
+import Editor from "/@/components/Editor/index.vue"
+import Tip from "/@/components/Tip/index.vue"
+import TagList from "/@/components/TagList/index.vue"
+import SvgIcon from "/@/components/SvgIcon/index.vue"
+import PreviewImage from "/@/components/PreviewImage/index.vue"
// 业务组件
-import SelectUser from '/@/components/Select/SelectUser.vue';
-import SelectWalletType from '/@/components/Select/SelectWalletType.vue';
-import SelectMch from '/@/components/Select/SelectMch.vue';
-import SelectDept from '/@/components/Select/SelectDept.vue';
-import SelectCtcg from '/@/components/Select/SelectCtcg.vue';
-import SelectCtcgd from '/@/components/Select/SelectCtcgd.vue';
+import SelectUser from "/@/components/Select/SelectUser.vue"
+import SelectWalletType from "/@/components/Select/SelectWalletType.vue"
+import SelectMch from "/@/components/Select/SelectMch.vue"
+import SelectDept from "/@/components/Select/SelectDept.vue"
+import SelectCtcg from "/@/components/Select/SelectCtcg.vue"
+import SelectCtcgol from "/@/components/Select/SelectCtcgol.vue"
// 第三方组件
-import ElementPlus from 'element-plus';
-import * as ElementPlusIconsVue from '@element-plus/icons-vue';
-import 'element-plus/dist/index.css';
-import { Pane, Splitpanes } from 'splitpanes';
-import 'splitpanes/dist/splitpanes.css';
+import ElementPlus from "element-plus"
+import * as ElementPlusIconsVue from "@element-plus/icons-vue"
+import "element-plus/dist/index.css"
+import { Pane, Splitpanes } from "splitpanes"
+import "splitpanes/dist/splitpanes.css"
// 日历组件
-import { setupCalendar } from 'v-calendar';
+import { setupCalendar } from "v-calendar"
// @ts-ignore 引入VForm3库
-import VForm3 from 'form-designer-plus'; //
-import 'form-designer-plus/dist/designer.style.css'; //引入VForm3样式
+import VForm3 from "form-designer-plus" //
+import "form-designer-plus/dist/designer.style.css" //引入VForm3样式
// 部门树组件
-import vue3TreeOrg from 'vue3-tree-org';
-import 'vue3-tree-org/lib/vue3-tree-org.css';
+import vue3TreeOrg from "vue3-tree-org"
+import "vue3-tree-org/lib/vue3-tree-org.css"
// 导入声明
-import { App } from 'vue';
+import { App } from "vue"
export default {
install(app: App) {
- app.component('DictTag', DictTag);
- app.component('DictSelect', DictSelect);
- app.component('Pagination', Pagination);
- app.component('RightToolbar', RightToolbar);
- app.component('uploadExcel', UploadExcel);
- app.component('UploadFile', UploadFile);
- app.component('UploadImg', UploadImg);
- app.component('UploadImgs', UploadImgs);
- app.component('Editor', Editor);
- app.component('Tip', Tip);
- app.component('DelWrap', DelWrap);
- app.component('TagList', TagList);
- app.component('SvgIcon', SvgIcon);
- app.component('PreviewImage', PreviewImage);
- app.component('SelectUser', SelectUser);
- app.component('SelectWalletType', SelectWalletType);
- app.component('SelectMch', SelectMch);
- app.component('SelectDept', SelectDept);
- app.component('SelectCtcg', SelectCtcg);
- app.component('SelectCtcgd', SelectCtcgd);
+ app.component("DictTag", DictTag)
+ app.component("DictSelect", DictSelect)
+ app.component("Pagination", Pagination)
+ app.component("RightToolbar", RightToolbar)
+ app.component("uploadExcel", UploadExcel)
+ app.component("UploadFile", UploadFile)
+ app.component("UploadImg", UploadImg)
+ app.component("UploadImgs", UploadImgs)
+ app.component("Editor", Editor)
+ app.component("Tip", Tip)
+ app.component("DelWrap", DelWrap)
+ app.component("TagList", TagList)
+ app.component("SvgIcon", SvgIcon)
+ app.component("PreviewImage", PreviewImage)
+ app.component("SelectUser", SelectUser)
+ app.component("SelectWalletType", SelectWalletType)
+ app.component("SelectMch", SelectMch)
+ app.component("SelectDept", SelectDept)
+ app.component("SelectCtcg", SelectCtcg)
+ app.component("SelectCtcgol", SelectCtcgol)
// 导入全部的elmenet-plus的图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
- app.component(key, component);
+ app.component(key, component)
// 兼容性
- app.component(`ele-${key}`, component);
+ app.component(`ele-${key}`, component)
}
// 导入布局插件
- app.component('Splitpanes', Splitpanes);
- app.component('Pane', Pane);
- app.use(ElementPlus); // ELEMENT 组件
- app.use(setupCalendar, {}); // 日历组件
- app.use(VForm3); // 表单设计
- app.use(vue3TreeOrg); // 组织架构组件
+ app.component("Splitpanes", Splitpanes)
+ app.component("Pane", Pane)
+ app.use(ElementPlus) // ELEMENT 组件
+ app.use(setupCalendar, {}) // 日历组件
+ app.use(VForm3) // 表单设计
+ app.use(vue3TreeOrg) // 组织架构组件
},
-};
+}
diff --git a/src/hooks/table.ts b/src/hooks/table.ts
index 3a80609..1a6b296 100644
--- a/src/hooks/table.ts
+++ b/src/hooks/table.ts
@@ -1,44 +1,44 @@
-import { CellStyle, ElMessage } from 'element-plus';
-import other from '/@/utils/other';
+import { CellStyle, ElMessage } from "element-plus"
+import other from "/@/utils/other"
/**
* 表格组件基础配置属性
*/
export interface BasicTableProps {
// 是否在创建页面时即调用数据列表接口,默认为true
- createdIsNeed?: boolean;
+ createdIsNeed?: boolean
// 是否需要分页,默认为true
- isPage?: boolean;
+ isPage?: boolean
// 查询条件表单对象,类型为any
- queryForm?: any;
+ queryForm?: any
// 数据列表数组
- dataList?: any[];
+ dataList?: any[]
// 分页属性对象
- pagination?: Pagination;
+ pagination?: Pagination
// 数据列表,loading状态标志,默认为false
- dataListLoading?: boolean;
+ dataListLoading?: boolean
// 数据列表多选项数组
- dataListSelections?: any[];
+ dataListSelections?: any[]
// 数据列表查询接口api方法,接收任意数量参数,返回Promise
- pageList?: (...arg: any) => Promise;
+ pageList?: (...arg: any) => Promise
// loading标志,默认为false
- loading?: Boolean;
+ loading?: Boolean
// 多选结果数组
- selectObjs?: any[];
+ selectObjs?: any[]
// 排序字段数组
- descs?: string[];
+ descs?: string[]
// 排序方式数组
- ascs?: string[];
+ ascs?: string[]
// props属性对象,类型为any
- props?: any;
+ props?: any
}
/**
* 表格样式。
*/
export interface TableStyle {
- cellStyle: CellStyle;
- headerCellStyle: CellStyle;
+ cellStyle: CellStyle
+ headerCellStyle: CellStyle
}
/**
@@ -46,15 +46,15 @@ export interface TableStyle {
*/
export interface Pagination {
// 当前页码,默认为1
- current?: number;
+ current?: number
// 每页显示条数,默认为10
- size?: number;
+ size?: number
// 总条数,默认为0
- total?: number;
+ total?: number
// 每页显示条数选择器的选项数组,默认为[10,20,30,40]
- pageSizes?: any[];
+ pageSizes?: any[]
// 分页组件布局方式,可选值有 total,sizes,prev,jump,next,默认为'total,sizes,prev,jump,next'
- layout?: String;
+ layout?: String
}
export function useTable(options?: BasicTableProps) {
@@ -75,7 +75,7 @@ export function useTable(options?: BasicTableProps) {
size: 10,
total: 0,
pageSizes: [1, 10, 20, 50, 100, 200],
- layout: 'total, sizes, prev, pager, next, jumper',
+ layout: "total, sizes, prev, pager, next, jumper",
} as Pagination,
// 当前选中的数据项,默认为空数组
dataListSelections: [],
@@ -89,10 +89,10 @@ export function useTable(options?: BasicTableProps) {
ascs: [],
// props属性配置对象,用于自定义数据属性,默认值为 {item:'records',totalCount:'total'}
props: {
- item: 'records',
- totalCount: 'total',
+ item: "records",
+ totalCount: "total",
},
- };
+ }
/**
* 合并默认属性配置和自定义属性配置
@@ -103,14 +103,14 @@ export function useTable(options?: BasicTableProps) {
const mergeDefaultOptions = (options: any, props: any): BasicTableProps => {
for (const key in options) {
if (!Object.getOwnPropertyDescriptor(props, key)) {
- props[key] = options[key];
+ props[key] = options[key]
}
}
- return props;
- };
+ return props
+ }
// 覆盖默认值
- const state = mergeDefaultOptions(defaultOptions, options);
+ const state = mergeDefaultOptions(defaultOptions, options)
/**
* 发起分页查询,并设置表格数据和分页信息
@@ -120,36 +120,36 @@ export function useTable(options?: BasicTableProps) {
if (state.pageList) {
try {
// 开始加载数据,设置state.loading为true
- state.loading = true;
+ state.loading = true
// 调用state.pageList方法发起分页查询
const res = await state.pageList({
...state.queryForm,
current: state.pagination?.current,
size: state.pagination?.size,
- descs: state.descs?.join(','),
- ascs: state.ascs?.join(','),
- });
+ descs: state.descs?.join(","),
+ ascs: state.ascs?.join(","),
+ })
// 设置表格展示的数据数组
- state.dataList = state.isPage ? res.data[state.props.item] : res.data;
+ state.dataList = state.isPage ? res.data[state.props.item] : res.data
// 设置分页信息中的总数据条数
- state.pagination!.total = state.isPage ? res.data[state.props.totalCount] : 0;
+ state.pagination!.total = state.isPage ? res.data[state.props.totalCount] : 0
} catch (err: any) {
// 捕获异常并显示错误提示
- ElMessage.error(err.msg || err.data.msg);
+ ElMessage.error(err.msg || err.data.msg)
} finally {
// 结束加载数据,设置state.loading为false
- state.loading = false;
+ state.loading = false
}
}
- };
+ }
onMounted(() => {
if (state.createdIsNeed) {
- query();
+ query()
}
- });
+ })
/**
* 分页大小改变事件处理函数
@@ -157,10 +157,10 @@ export function useTable(options?: BasicTableProps) {
*/
const sizeChangeHandle = (val: number) => {
// 修改state.pagination中的size属性
- state.pagination!.size = val;
+ state.pagination!.size = val
// 再次发起查询操作
- query();
- };
+ query()
+ }
/**
* 当前页码改变事件处理函数
@@ -168,34 +168,34 @@ export function useTable(options?: BasicTableProps) {
*/
const currentChangeHandle = (val: number) => {
// 修改state.pagination中的current属性
- state.pagination!.current = val;
+ state.pagination!.current = val
// 再次发起查询操作
- query();
- };
+ query()
+ }
// 排序触发事件
const sortChangeHandle = (column: any) => {
- const prop = other.toUnderline(column.prop);
- if (column.order === 'descending') {
- state.descs?.push(prop);
+ const prop = other.toUnderline(column.prop)
+ if (column.order === "descending") {
+ state.descs?.push(prop)
if (state.ascs!.includes(prop)) {
- state.ascs?.splice(state.ascs.indexOf(prop), 1);
+ state.ascs?.splice(state.ascs.indexOf(prop), 1)
}
- } else if (column.order === 'ascending') {
- state.ascs?.push(prop);
+ } else if (column.order === "ascending") {
+ state.ascs?.push(prop)
if (state.descs!.includes(prop)) {
- state.descs?.splice(state.descs.indexOf(prop), 1);
+ state.descs?.splice(state.descs.indexOf(prop), 1)
}
} else {
if (state.ascs!.includes(prop)) {
- state.ascs?.splice(state.ascs.indexOf(prop), 1);
+ state.ascs?.splice(state.ascs.indexOf(prop), 1)
}
if (state.descs!.includes(prop)) {
- state.descs?.splice(state.descs.indexOf(prop), 1);
+ state.descs?.splice(state.descs.indexOf(prop), 1)
}
}
- query();
- };
+ query()
+ }
/**
* 获取数据列表,并可选择是否刷新当前页码
@@ -205,11 +205,11 @@ export function useTable(options?: BasicTableProps) {
const getDataList = (refresh?: any) => {
// 如果需要刷新,则将state.pagination.current重置为1
if (refresh !== false) {
- state.pagination!.current = 1;
+ state.pagination!.current = 1
}
// 再次发起查询操作
- query();
- };
+ query()
+ }
/**
* 下载文件
@@ -219,21 +219,21 @@ export function useTable(options?: BasicTableProps) {
* @returns 返回一个Promise对象,用于异步处理结果
*/
const downBlobFile = (url: string, query: any, fileName: string) => {
- return other.downBlobFile(url, query, fileName);
- };
+ return other.downBlobFile(url, query, fileName)
+ }
/**
* 定义表格通用样式
* @returns css
*/
const tableStyle: TableStyle = {
- cellStyle: { textAlign: 'center' },
+ cellStyle: { textAlign: "center" },
headerCellStyle: {
- textAlign: 'center',
- background: 'var(--el-table-row-hover-bg-color)',
- color: 'var(--el-text-color-primary)',
+ textAlign: "center",
+ background: "var(--el-table-row-hover-bg-color)",
+ color: "var(--el-text-color-primary)",
},
- };
+ }
return {
tableStyle,
@@ -242,5 +242,5 @@ export function useTable(options?: BasicTableProps) {
currentChangeHandle,
sortChangeHandle,
downBlobFile,
- };
+ }
}
diff --git a/src/views/canteen/canteenDailyMenu/form.vue b/src/views/canteen/canteenDailyMenu/form.vue
index c980747..f73697d 100644
--- a/src/views/canteen/canteenDailyMenu/form.vue
+++ b/src/views/canteen/canteenDailyMenu/form.vue
@@ -12,10 +12,14 @@
未知类型
-
+
+
+
+ 选择菜品
- 预览图
-
-
![]()
-
+ 预览图
+
+
+
+
+
+ {{ item.name }}
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+ {{ categoryOptions?.find((item: any) => item?.id === row?.categoryId)?.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ displayPrice(scope.row.price) }}
+
+
+
+
+ {{ displayPrice(scope.row.marketPrice) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/canteen/canteenDailyMenu/index.vue b/src/views/canteen/canteenDailyMenu/index.vue
index e460c06..0749b52 100644
--- a/src/views/canteen/canteenDailyMenu/index.vue
+++ b/src/views/canteen/canteenDailyMenu/index.vue
@@ -21,179 +21,226 @@
-
-
-
- | 早餐 |
-
-
- |
+
+
+
+ | 早餐 |
+
+
+
+ {{ item.name }}
+ |
+
-
- | 中餐 |
-
-
- |
+
+ | 中餐 |
+
+
+
+ {{ item.name }}
+ |
+
-
- | 晚餐 |
-
-
- |
+
+ | 晚餐 |
+
+
+
+ {{ item.name }}
+ |
+
-
+