原料bug修改
This commit is contained in:
parent
a3a956657f
commit
b18c592947
|
|
@ -65,8 +65,8 @@ service.interceptors.request.use(config => {
|
||||||
if (contentType.includes('application/json') && typeof data !== 'undefined') {
|
if (contentType.includes('application/json') && typeof data !== 'undefined') {
|
||||||
// 加密数据
|
// 加密数据
|
||||||
if (systemConfig.requestConfig.encryptRequest && encryptRequest) {
|
if (systemConfig.requestConfig.encryptRequest && encryptRequest) {
|
||||||
console.log(data);
|
// console.log(data);
|
||||||
console.log(hashWithSM3AndSalt(data));
|
// console.log(hashWithSM3AndSalt(data));
|
||||||
config.data = encryptWithSM4(data+"|"+hashWithSM3AndSalt(data))
|
config.data = encryptWithSM4(data+"|"+hashWithSM3AndSalt(data))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -81,8 +81,8 @@ service.interceptors.request.use(config => {
|
||||||
// 防止重复提交
|
// 防止重复提交
|
||||||
const sessionObj = cache.session.getJSON('sessionObj') || {}
|
const sessionObj = cache.session.getJSON('sessionObj') || {}
|
||||||
const requestObj = { url: config.url, data: data, time: Date.now() }
|
const requestObj = { url: config.url, data: data, time: Date.now() }
|
||||||
console.log(sessionObj)
|
// console.log(sessionObj)
|
||||||
console.log(requestObj)
|
// console.log(requestObj)
|
||||||
if(requestObj.data&&requestObj.data.indexOf('pageNum')==-1){
|
if(requestObj.data&&requestObj.data.indexOf('pageNum')==-1){
|
||||||
if (sessionObj.data === requestObj.data && requestObj.time - sessionObj.time < 3000 && sessionObj.url === requestObj.url) {
|
if (sessionObj.data === requestObj.data && requestObj.time - sessionObj.time < 3000 && sessionObj.url === requestObj.url) {
|
||||||
console.warn(`[${sessionObj.url}]: 数据正在处理,请勿重复提交`)
|
console.warn(`[${sessionObj.url}]: 数据正在处理,请勿重复提交`)
|
||||||
|
|
|
||||||
|
|
@ -694,7 +694,41 @@ export default {
|
||||||
this.$set(this.form,"nutritionId",row.nutritionId)
|
this.$set(this.form,"nutritionId",row.nutritionId)
|
||||||
if(this.form.nutritionId){
|
if(this.form.nutritionId){
|
||||||
getNutrition({nutritionId: this.form.nutritionId}).then((response) => {
|
getNutrition({nutritionId: this.form.nutritionId}).then((response) => {
|
||||||
|
if(response.data){
|
||||||
this.form.menuMaterialNutritionDTO = response.data
|
this.form.menuMaterialNutritionDTO = response.data
|
||||||
|
}else{
|
||||||
|
this.form.menuMaterialNutritionDTO = {
|
||||||
|
edible: '',//可食部分(g/100g)
|
||||||
|
water: '',//水分(g/100g)
|
||||||
|
calories: '',//热量(千卡/100g)
|
||||||
|
protein: '',//蛋白质(g/100g)
|
||||||
|
fat: '',//脂肪(g/100g)
|
||||||
|
carbohydrate: '',//碳水化合物(g/100g)
|
||||||
|
dietaryFiber: '',//膳食纤维(g/100g)
|
||||||
|
cholesterol: '',//胆固醇(mg/100g)
|
||||||
|
ash: '',//灰分(g/100g)
|
||||||
|
vitaminA: '',//维生素a(μg/100g)
|
||||||
|
|
||||||
|
carotene: '',//胡萝卜素(μg/100g)
|
||||||
|
retinol: '',//视黄醇(μg/100g)
|
||||||
|
thiamine: '',//硫胺素(mg/100g)
|
||||||
|
riboflavin: '',//核黄素(mg/100g)
|
||||||
|
niacin: '',//烟酸/尼克酸(mg/100g)
|
||||||
|
vitaminC: '',//维生素c(mg/100g)
|
||||||
|
vitaminE: '',//维生素e(g/100g)
|
||||||
|
calcium: '',//钙(mg/100g)
|
||||||
|
phosphorus: '',//磷(mg/100g)
|
||||||
|
kalium: '',//钾(mg/100g)
|
||||||
|
sodium: '',//钠(mg/100g)
|
||||||
|
magnesium: '',//镁(mg/100g)
|
||||||
|
iron: '',//铁(mg/100g)
|
||||||
|
zinc: '',//锌(mg/100g)
|
||||||
|
selenium: '',//硒(μg/100g)
|
||||||
|
cuprum: '',//铜(mg/100g)
|
||||||
|
manganese: '',//锰(mg/100g)
|
||||||
|
iodine: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
this.form.menuMaterialNutritionDTO = {
|
this.form.menuMaterialNutritionDTO = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue