|
|
@@ -44,7 +44,7 @@
|
|
|
<span>{{ row.name }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="描述" align="center">
|
|
|
+ <el-table-column label="描述" align="center" width="200">
|
|
|
<template slot-scope="{row}">
|
|
|
<span>{{ row.description }}</span>
|
|
|
</template>
|
|
|
@@ -94,14 +94,20 @@
|
|
|
<span>{{ row.updateTime }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding" width="500">
|
|
|
<template slot-scope="{row,$index}">
|
|
|
<el-button type="primary" size="mini" @click="handleUpdate(row)">
|
|
|
更新
|
|
|
</el-button>
|
|
|
- <el-button type="primary" size="mini" @click="addNutrient(row)">
|
|
|
+ <el-button type="primary" size="mini" @click="manageNutrients(row)">
|
|
|
营养素关联
|
|
|
</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="manageUnits(row)">
|
|
|
+ 单位管理
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="manageModifiers(row)">
|
|
|
+ 规格管理
|
|
|
+ </el-button>
|
|
|
<el-button size="mini" type="danger" @click="handleDelete(row, $index)">
|
|
|
删除
|
|
|
</el-button>
|
|
|
@@ -162,8 +168,14 @@ export default {
|
|
|
handleUpdate(row) {
|
|
|
this.$router.push({ path: '/food/edit/' + row.id })
|
|
|
},
|
|
|
- addNutrient(row) {
|
|
|
- this.$router.push( { path: `/food/${row.id}/addNutrient` })
|
|
|
+ manageNutrients(row) {
|
|
|
+ this.$router.push( { path: `/food/${row.id}/nutrient` })
|
|
|
+ },
|
|
|
+ manageUnits(row) {
|
|
|
+ this.$router.push({ path: `/food/${row.id}/unit` })
|
|
|
+ },
|
|
|
+ manageModifiers(row) {
|
|
|
+ this.$router.push({ path: `/food/${row.id}/modifier` })
|
|
|
},
|
|
|
handleDelete(row, index) {
|
|
|
remove(row.id).then(res => {
|