Merge branch 'master' of http://124.223.211.244:8418/zianxin/biz-pc-cloud
This commit is contained in:
commit
bac2067c08
3 files changed
+15
-30
No files matched your search
@@ -23,11 +23,11 @@ export function getObj(id?: string) {
|
||||
})
|
||||
}
|
||||
|
||||
export function delObjs(data?: Object) {
|
||||
export function delObjs(tid: number[], merchantId: string) {
|
||||
return request({
|
||||
url: "/canteen/canteenDailyMenu",
|
||||
url: `/canteen/canteenDailyMenu?merchantId=${merchantId}`,
|
||||
method: "delete",
|
||||
data,
|
||||
data: tid,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<CircleClose />
|
||||
</el-icon>
|
||||
<el-image style="width: 80px; height: 80px" :src="imageBaseUrl + item.picUrl" fit="cover" />
|
||||
<div class="w-full flex justify-around items-center text-black">
|
||||
<div class="w-full flex justify-around items-center text-black mt-2">
|
||||
<span>{{ item.name }}</span>
|
||||
<span class="mx-1">|</span>
|
||||
<span class="text-sm">
|
||||
|
||||
@@ -26,14 +26,9 @@
|
||||
<tr class="food">
|
||||
<td @click="addFood(1)">早餐</td>
|
||||
<div class="food_list">
|
||||
<td class="food_list_item" v-for="(item, index) in foodData1" :key="index">
|
||||
<el-image
|
||||
style="width: 80px; height: 80px"
|
||||
:src="imageBaseUrl + item.picUrl"
|
||||
fit="cover"
|
||||
@click="delteData(item.tid)"
|
||||
/>
|
||||
<div class="w-full flex justify-around items-center text-black">
|
||||
<td class="food_list_item" v-for="(item, index) in foodData1" :key="index" @click="delteData(item.tid)">
|
||||
<el-image style="width: 80px; height: 80px" :src="imageBaseUrl + item.picUrl" fit="cover" />
|
||||
<div class="w-full flex justify-around items-center text-black mt-2">
|
||||
<span>{{ item.name }}</span>
|
||||
<span class="mx-1">|</span>
|
||||
<span class="text-sm">{{ canteenCategoryOption.find((v: any) => v.id == item.categoryId)?.name }}</span>
|
||||
@@ -45,14 +40,9 @@
|
||||
<tr class="food">
|
||||
<td @click="addFood(2)">中餐</td>
|
||||
<div class="food_list">
|
||||
<td class="food_list_item" v-for="(item, index) in foodData2" :key="index">
|
||||
<el-image
|
||||
style="width: 80px; height: 80px"
|
||||
:src="imageBaseUrl + item.picUrl"
|
||||
fit="cover"
|
||||
@click="delteData(item.tid)"
|
||||
/>
|
||||
<div class="w-full flex justify-around items-center text-black">
|
||||
<td class="food_list_item" v-for="(item, index) in foodData2" :key="index" @click="delteData(item.tid)">
|
||||
<el-image style="width: 80px; height: 80px" :src="imageBaseUrl + item.picUrl" fit="cover" />
|
||||
<div class="w-full flex justify-around items-center text-black mt-2">
|
||||
<span>{{ item.name }}</span>
|
||||
<span class="mx-1">|</span>
|
||||
<span class="text-sm">{{ canteenCategoryOption.find((v: any) => v.id == item.categoryId)?.name }}</span>
|
||||
@@ -64,14 +54,9 @@
|
||||
<tr class="food">
|
||||
<td @click="addFood(3)">晚餐</td>
|
||||
<div class="food_list">
|
||||
<td class="food_list_item" v-for="(item, index) in foodData3" :key="index">
|
||||
<el-image
|
||||
style="width: 80px; height: 80px"
|
||||
:src="imageBaseUrl + item.picUrl"
|
||||
fit="cover"
|
||||
@click="delteData(item.tid)"
|
||||
/>
|
||||
<div class="w-full flex justify-around items-center text-black">
|
||||
<td class="food_list_item" v-for="(item, index) in foodData3" :key="index" @click="delteData(item.tid)">
|
||||
<el-image style="width: 80px; height: 80px" :src="imageBaseUrl + item.picUrl" fit="cover" />
|
||||
<div class="w-full flex justify-around items-center text-black mt-2">
|
||||
<span>{{ item.name }}</span>
|
||||
<span class="mx-1">|</span>
|
||||
<span class="text-sm">{{ canteenCategoryOption.find((v: any) => v.id == item.categoryId)?.name }}</span>
|
||||
@@ -115,7 +100,7 @@ const weekParams = reactive({
|
||||
const weekData = reactive({
|
||||
data: [],
|
||||
}) //时间数组
|
||||
const merchantId = ref()
|
||||
const merchantId = ref() // 商户id
|
||||
const merchantInfo = ref<any>([])
|
||||
|
||||
const addFood = async (hourType: number) => {
|
||||
@@ -192,7 +177,7 @@ const selectTimeFood = async () => {
|
||||
const delteData = async (tid: number) => {
|
||||
await message.delConfirm("确定删除菜品吗?", "今日菜品?")
|
||||
try {
|
||||
await delObjs([tid])
|
||||
await delObjs([tid], merchantId.value)
|
||||
message.success("删除成功")
|
||||
} catch (error) {
|
||||
message.error("删除失败")
|
||||
|
||||
Reference in new issue
Block a user