|
|
@@ -324,10 +324,12 @@ export default {
|
|
|
},
|
|
|
queryNutrientUnits(query, nutrientId, cb) {
|
|
|
let units = []
|
|
|
- getNutrientUnits(nutrientId, { query }).then(res => {
|
|
|
- res.data.forEach(item => units.push({ value: item }))
|
|
|
- cb(units)
|
|
|
- })
|
|
|
+ if (nutrientId) {
|
|
|
+ getNutrientUnits(nutrientId, { query }).then(res => {
|
|
|
+ res.data.forEach(item => units.push({ value: item }))
|
|
|
+ cb(units)
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
setSort() {
|
|
|
const el = this.$refs.detailTable.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0]
|