提交 fbfb7a7a authored 作者: 350505825@qq.com's avatar 350505825@qq.com

提交代码

上级 c26d8142
...@@ -8,6 +8,15 @@ export function getRecipeType() { ...@@ -8,6 +8,15 @@ export function getRecipeType() {
}) })
} }
//获取菜谱列表
export function getRecipeList() {
return request({
url: '/recipeWeek/getRecipeList',
method: 'get',
})
}
//根据星期获取菜谱 //根据星期获取菜谱
export function getRecipeByWeek(week) { export function getRecipeByWeek(week) {
return request({ return request({
...@@ -15,10 +24,8 @@ export function getRecipeByWeek(week) { ...@@ -15,10 +24,8 @@ export function getRecipeByWeek(week) {
method: 'get', method: 'get',
}) })
} }
//根据星期获取菜谱 //根据星期更新菜谱
export function updateRecipeWeek(week,data) { export function updateRecipeWeek(week,data) {
console.log(week)
console.log(data)
return request({ return request({
url: '/recipeWeek/updateRecipeWeek/'+week, url: '/recipeWeek/updateRecipeWeek/'+week,
method: 'post', method: 'post',
......
...@@ -74,7 +74,13 @@ ...@@ -74,7 +74,13 @@
</div> </div>
</template> </template>
<script> <script>
import {getRecipeType,getRecipeByWeek,updateRecipeWeek} from "@/api/recipe/recipeSetting"; import {
getRecipeType,
getRecipeByWeek,
updateRecipeWeek,
getRecipeList
}
from "@/api/recipe/recipeSetting";
export default { export default {
//页签缓存页面的name要和路由中的那么要相同,才能缓存, //页签缓存页面的name要和路由中的那么要相同,才能缓存,
//如果是自定义菜单,则页面的name和菜单管理中路由地址要相同,才model能页签缓存 //如果是自定义菜单,则页面的name和菜单管理中路由地址要相同,才model能页签缓存
...@@ -148,7 +154,8 @@ ...@@ -148,7 +154,8 @@
}; };
}, },
created() { created() {
this.getRecipeType() this.getRecipeType();
this.getRecipeList();
//this.getList(); //this.getList();
}, },
methods: { methods: {
...@@ -166,6 +173,13 @@ ...@@ -166,6 +173,13 @@
} }
}) })
}, },
//获取菜谱列表
getRecipeList(){
getRecipeList().then(response=>{
//菜谱列表
this.recipeWeek = response.rows;
})
},
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.open = false; this.open = false;
......
...@@ -112,15 +112,15 @@ ...@@ -112,15 +112,15 @@
v-hasPermi="['system:user:remove']" v-hasPermi="['system:user:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">-->
<el-button <!-- <el-button-->
type="info" <!-- type="info"-->
icon="el-icon-upload2" <!-- icon="el-icon-upload2"-->
size="mini" <!-- size="mini"-->
@click="handleImport" <!-- @click="handleImport"-->
v-hasPermi="['system:user:import']" <!-- v-hasPermi="['system:user:import']"-->
>导入</el-button> <!-- >导入</el-button>-->
</el-col> <!-- </el-col>-->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
...@@ -662,4 +662,4 @@ export default { ...@@ -662,4 +662,4 @@ export default {
} }
} }
}; };
</script> </script>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论