|
@@ -30,6 +30,7 @@
|
|
|
fit
|
|
fit
|
|
|
highlight-current-row
|
|
highlight-current-row
|
|
|
style="width: 100%;"
|
|
style="width: 100%;"
|
|
|
|
|
+ @row-click="showDialog"
|
|
|
>
|
|
>
|
|
|
<el-table-column type="index" label="序号" align="center" fixed width="60px" />
|
|
<el-table-column type="index" label="序号" align="center" fixed width="60px" />
|
|
|
<el-table-column label="名称" fixed align="center">
|
|
<el-table-column label="名称" fixed align="center">
|
|
@@ -106,11 +107,15 @@
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <el-dialog title="营养素计算" :visible.sync="contentDialogVisible">
|
|
|
|
|
+ <span v-html="recipeContentHtml" />
|
|
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { getRecipes, createRecipe, updateRecipe, removeRecipe } from '@/api/recipe'
|
|
|
|
|
|
|
+import { getRecipes, createRecipe, updateRecipe, removeRecipe, getRecipeReport } from '@/api/recipe'
|
|
|
import Pagination from '@/components/Pagination'
|
|
import Pagination from '@/components/Pagination'
|
|
|
import SingleImage from '@/components/Upload/SingleImage'
|
|
import SingleImage from '@/components/Upload/SingleImage'
|
|
|
|
|
|
|
@@ -131,7 +136,9 @@ export default {
|
|
|
textMap: { 'create': '新建', 'edit': '更新' },
|
|
textMap: { 'create': '新建', 'edit': '更新' },
|
|
|
dialogStatus: '',
|
|
dialogStatus: '',
|
|
|
rules: {},
|
|
rules: {},
|
|
|
- params: {}
|
|
|
|
|
|
|
+ params: {},
|
|
|
|
|
+ recipeContentHtml: '',
|
|
|
|
|
+ contentDialogVisible: false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
@@ -191,6 +198,14 @@ export default {
|
|
|
},
|
|
},
|
|
|
updateFile(value) {
|
|
updateFile(value) {
|
|
|
this.$set(this.params, 'coverPic', value)
|
|
this.$set(this.params, 'coverPic', value)
|
|
|
|
|
+ },
|
|
|
|
|
+ showDialog(row) {
|
|
|
|
|
+ getRecipeReport(row.id).then(res => {
|
|
|
|
|
+ this.contentDialogVisible = true
|
|
|
|
|
+ this.recipeContentHtml = res.data
|
|
|
|
|
+ }).catch(res => {
|
|
|
|
|
+ this.$message.error(res.data.message)
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|