diff --git a/src/views/recipe/index.vue b/src/views/recipe/index.vue index 063f51b..9b7e7bb 100644 --- a/src/views/recipe/index.vue +++ b/src/views/recipe/index.vue @@ -36,57 +36,60 @@ 添加食谱类别 -
-

{{ item.tName }}

- - - - - - - - - - - - - - - - - - - - -
+
+
+

{{ item.tName }}

+ + + + + + + + + + + + + + + + + + + + +
+
+ @@ -311,7 +314,6 @@ export default { } this.defaultTable.push(obj) } - this.tableData = this.defaultTable }, watch: { 'query.wId'(newVal, oldVal) { @@ -492,7 +494,8 @@ export default { console.log(this.form) let obj = { tName: this.form.tName, - wId: this.query.wId + wId: this.query.wId, + contents: JSON.stringify(this.defaultTable) } postMeal(obj).then(res =>{ this.isRecipeModel = false @@ -522,6 +525,7 @@ export default { // 班级列表 recipeList(){ getRecipe(this.query.wId).then(res =>{ + this.allClass = [] this.allClass = res.data.map( item =>{ if(item.contents){ let arr = JSON.parse(item.contents)