食谱制作界面
This commit is contained in:
@ -117,7 +117,7 @@ export default {
|
||||
// 健康评估标题
|
||||
healthyTitleData:[
|
||||
[
|
||||
["创建时间","客户姓名","手机号"],["调理项目","性别","年龄"],["身高(厘米)","体重(斤)","位置"]
|
||||
["创建时间","客户姓名","手机号"],["调理项目","性别","年龄"],["身高(厘米)","体重(斤)","地域"]
|
||||
],
|
||||
[
|
||||
["减脂经历","减脂遇到的困难","减脂是否反弹"],["是否意识到生活习惯是减脂关键","",""]
|
||||
@ -164,7 +164,7 @@ export default {
|
||||
[
|
||||
["breakfastType","breakfastFood","lunchType"],["dinner","vegetableRate","commonMeat"],
|
||||
["dinnerTime","supperNum","supperFood"],["dietHotAndCold","dietFlavor","vegetablesNum"],
|
||||
["vegetablesRateType","fruitsNum","fruitsTime"],["fruitsRate","riceNum","riceNum"],
|
||||
["vegetablesRateType","fruitsNum","fruitsTime"],["fruitsRate","riceNum","riceFull"],
|
||||
["eatingSpeed","makeFoodType","snacks"],
|
||||
["healthProductsFlag","healthProductsBrand","healthProductsName"],
|
||||
["healthProductsWeekRate","dishesIngredient",""]
|
||||
|
@ -147,7 +147,7 @@ export const constantRoutes = [
|
||||
{
|
||||
path: "build/:cusId/:id(\\d+)",
|
||||
component: resolve =>
|
||||
require(["@/views/custom/recipesPlan/build"], resolve),
|
||||
require(["@/views/custom/recipesBuild"], resolve),
|
||||
name: "RecipiesBuild",
|
||||
props: true,
|
||||
meta: { title: "食谱制作" }
|
||||
|
@ -8,188 +8,550 @@ export const titleArray = [
|
||||
"七、睡眠质量评估",
|
||||
"八、既往病史/用药史评估",
|
||||
"九、体检报告"
|
||||
]
|
||||
];
|
||||
|
||||
export const condimentArray = [
|
||||
{"name":"鸡精", "value":"1"},
|
||||
{"name":"耗油", "value":"2"},
|
||||
{"name":"生抽", "value":"3"},
|
||||
{"name":"老抽", "value":"4"},
|
||||
{"name":"香油", "value":"5"},
|
||||
{"name":"浓汤宝", "value":"6"},
|
||||
{"name":"鸡粉", "value":"7"},
|
||||
{"name":"花椒", "value":"8"},
|
||||
{"name":"辣椒油", "value":"9"}
|
||||
]
|
||||
{ name: "鸡精", value: "1" },
|
||||
{ name: "耗油", value: "2" },
|
||||
{ name: "生抽", value: "3" },
|
||||
{ name: "老抽", value: "4" },
|
||||
{ name: "香油", value: "5" },
|
||||
{ name: "浓汤宝", value: "6" },
|
||||
{ name: "鸡粉", value: "7" },
|
||||
{ name: "花椒", value: "8" },
|
||||
{ name: "辣椒油", value: "9" }
|
||||
];
|
||||
|
||||
export const cookingStyleArray = [
|
||||
{"name":"煎","value":"1"},{"name":"烤","value":"2"},{"name":"炸","value":"3"},{"name":"卤","value":"4"},
|
||||
{"name":"腌","value":"5"},{"name":"腊","value":"6"},{"name":"煲","value":"7"},{"name":"炒","value":"8"},
|
||||
{"name":"蒸","value":"9"},{"name":"刺身","value":"10"},{"name":"水煮","value":"11"}
|
||||
]
|
||||
|
||||
export const cookingStyleRateArray = ["煎","炸","卤","腌","腊","煲"]
|
||||
{ name: "煎", value: "1" },
|
||||
{ name: "烤", value: "2" },
|
||||
{ name: "炸", value: "3" },
|
||||
{ name: "卤", value: "4" },
|
||||
{ name: "腌", value: "5" },
|
||||
{ name: "腊", value: "6" },
|
||||
{ name: "煲", value: "7" },
|
||||
{ name: "炒", value: "8" },
|
||||
{ name: "蒸", value: "9" },
|
||||
{ name: "刺身", value: "10" },
|
||||
{ name: "水煮", value: "11" }
|
||||
];
|
||||
|
||||
export const washVegetablesStyleArray = [
|
||||
{"name":"先切后洗","value": "1"},{"name":"先洗后切","value": "2"},{"name":"切后浸泡","value": "3"}
|
||||
]
|
||||
{ name: "先切后洗", value: "1" },
|
||||
{ name: "先洗后切", value: "2" },
|
||||
{ name: "切后浸泡", value: "3" }
|
||||
];
|
||||
|
||||
export const breakfastTypeArray = [
|
||||
{"name":"不吃","value": "1"},{"name":"偶尔吃","value": "2"},{"name":"每天吃","value": "3"}
|
||||
]
|
||||
{ name: "不吃", value: "1" },
|
||||
{ name: "偶尔吃", value: "2" },
|
||||
{ name: "每天吃", value: "3" }
|
||||
];
|
||||
|
||||
export const lunchTypeArray = [
|
||||
{"name":"外卖","value":"1"},{"name":"自带餐","value":"2"},{"name":"快餐","value":"3"},{"name":"餐厅","value":"4"}
|
||||
]
|
||||
{ name: "外卖", value: "1" },
|
||||
{ name: "自带餐", value: "2" },
|
||||
{ name: "快餐", value: "3" },
|
||||
{ name: "餐厅", value: "4" }
|
||||
];
|
||||
|
||||
export const dinnerArray = [
|
||||
{"name":"餐馆吃","value":"1"},{"name":"在家吃","value":"2"},{"name":"丰盛","value":"3"},{"name":"清淡","value":"4"}
|
||||
]
|
||||
{ name: "餐馆吃", value: "1" },
|
||||
{ name: "在家吃", value: "2" },
|
||||
{ name: "丰盛", value: "3" },
|
||||
{ name: "清淡", value: "4" }
|
||||
];
|
||||
|
||||
export const dietHotAndColdArray = [
|
||||
{"name":"偏冷食","value":"1"},{"name":"偏热食","value":"2"},{"name":"正常","value":"3"}
|
||||
]
|
||||
{ name: "偏冷食", value: "1" },
|
||||
{ name: "偏热食", value: "2" },
|
||||
{ name: "正常", value: "3" }
|
||||
];
|
||||
|
||||
export const dietFlavorArray = [
|
||||
{"name":"偏油","value":"1"},{"name":"偏咸","value":"2"},{"name":"偏辣","value":"3"},
|
||||
{"name":"偏甜","value":"4"},{"name":"偏酸","value":"5"},{"name":"清淡","value":"6"}
|
||||
]
|
||||
{ name: "偏油", value: "1" },
|
||||
{ name: "偏咸", value: "2" },
|
||||
{ name: "偏辣", value: "3" },
|
||||
{ name: "偏甜", value: "4" },
|
||||
{ name: "偏酸", value: "5" },
|
||||
{ name: "清淡", value: "6" }
|
||||
];
|
||||
|
||||
export const vegetablesRateTypeArray = [
|
||||
{"name":"每天吃","value":"1"},{"name":"经常吃","value":"2"},{"name":"偶尔吃","value":"3"},{"name":"从不吃","value":"4"}
|
||||
]
|
||||
{ name: "每天吃", value: "1" },
|
||||
{ name: "经常吃", value: "2" },
|
||||
{ name: "偶尔吃", value: "3" },
|
||||
{ name: "从不吃", value: "4" }
|
||||
];
|
||||
|
||||
export const fruitsTimeArray = [
|
||||
{"name":"餐前","value":"1"},{"name":"餐后","value":"2"},{"name":"餐间","value":"3"}
|
||||
]
|
||||
|
||||
{ name: "餐前", value: "1" },
|
||||
{ name: "餐后", value: "2" },
|
||||
{ name: "餐间", value: "3" }
|
||||
];
|
||||
|
||||
export const fruitsRateArray = [
|
||||
{"name":"每天吃","value":"1"},{"name":"经常吃","value":"2"},{"name":"偶尔吃","value":"3"},{"name":"从不吃","value":"4"}
|
||||
]
|
||||
{ name: "每天吃", value: "1" },
|
||||
{ name: "经常吃", value: "2" },
|
||||
{ name: "偶尔吃", value: "3" },
|
||||
{ name: "从不吃", value: "4" }
|
||||
];
|
||||
|
||||
export const eatingSpeedArray = [
|
||||
{"name":"很快","value":"1"},{"name":"偏快","value":"2"},{"name":"正常","value":"3"},{"name":"偏慢","value":"4"}
|
||||
,{"name":"很慢","value":"5"}
|
||||
]
|
||||
{ name: "很快", value: "1" },
|
||||
{ name: "偏快", value: "2" },
|
||||
{ name: "正常", value: "3" },
|
||||
{ name: "偏慢", value: "4" },
|
||||
{ name: "很慢", value: "5" }
|
||||
];
|
||||
|
||||
export const snacksArray = [
|
||||
{"name":"面包","value":"1"},{"name":"蛋糕","value":"2"},{"name":"饼干","value":"3"},{"name":"冰淇淋","value":"4"}
|
||||
,{"name":"糖果","value":"5"},{"name":"巧克力","value":"6"},{"name":"方便面","value":"7"},{"name":"薯条","value":"8"},{"name":"肉干","value":"9"},
|
||||
{"name":"坚果","value":"10"},{"name":"饮料","value":"11"},{"name":"果脯","value":"12"},{"name":"牛奶","value":"13"}
|
||||
]
|
||||
|
||||
{ name: "面包", value: "1" },
|
||||
{ name: "蛋糕", value: "2" },
|
||||
{ name: "饼干", value: "3" },
|
||||
{ name: "冰淇淋", value: "4" },
|
||||
{ name: "糖果", value: "5" },
|
||||
{ name: "巧克力", value: "6" },
|
||||
{ name: "方便面", value: "7" },
|
||||
{ name: "薯条", value: "8" },
|
||||
{ name: "肉干", value: "9" },
|
||||
{ name: "坚果", value: "10" },
|
||||
{ name: "饮料", value: "11" },
|
||||
{ name: "果脯", value: "12" },
|
||||
{ name: "牛奶", value: "13" }
|
||||
];
|
||||
|
||||
export const waterTypeArray = [
|
||||
{"name":"冰水","value":"1"},{"name":"温水","value":"2"},{"name":"常温水","value":"3"}
|
||||
]
|
||||
|
||||
{ name: "冰水", value: "1" },
|
||||
{ name: "温水", value: "2" },
|
||||
{ name: "常温水", value: "3" }
|
||||
];
|
||||
|
||||
export const waterHabitArray = [
|
||||
{"name":"均匀地喝","value":"1"},{"name":"餐前多喝","value":"2"},{"name":"餐后多喝","value":"3"},{"name":"餐间多喝","value":"4"},
|
||||
{"name":"随时喝","value":"5"}
|
||||
]
|
||||
|
||||
export const drinksNumArray = ["老火汤","咖啡","浓茶","奶茶","冷饮","碳酸饮料","甜饮料","鲜榨果汁"]
|
||||
|
||||
{ name: "均匀地喝", value: "1" },
|
||||
{ name: "餐前多喝", value: "2" },
|
||||
{ name: "餐后多喝", value: "3" },
|
||||
{ name: "餐间多喝", value: "4" },
|
||||
{ name: "随时喝", value: "5" }
|
||||
];
|
||||
|
||||
export const drinkWineFlagArray = [
|
||||
{"name":"经常饮酒","value": "1"},{"name":"不饮酒","value": "2"},{"name":"偶尔","value": "3"}
|
||||
]
|
||||
|
||||
{ name: "经常饮酒", value: "1" },
|
||||
{ name: "不饮酒", value: "2" },
|
||||
{ name: "偶尔", value: "3" }
|
||||
];
|
||||
|
||||
export const drinkWineClassifyArray = [
|
||||
{"name":"白酒","value": "1"},{"name":"红酒","value": "2"},{"name":"啤酒","value": "3"}
|
||||
]
|
||||
|
||||
export const drinkWineAmountArray = ["白酒","啤酒","红酒"]
|
||||
|
||||
export const drinkWineAmountUnitArray = ["两","瓶","毫升"]
|
||||
|
||||
export const smokeRateArray = ["每天抽烟","烟龄","已戒烟"]
|
||||
export const smokeRateUnitArray = ["次","年","年"]
|
||||
{ name: "白酒", value: "1" },
|
||||
{ name: "红酒", value: "2" },
|
||||
{ name: "啤酒", value: "3" }
|
||||
];
|
||||
|
||||
export const workTypeArray = [
|
||||
{"name":"工作时间长","value": "1"},{"name":"久坐","value": "2"},{"name":"久站","value": "3"},
|
||||
{"name":"走动多","value": "4"},{"name":"强度大","value": "5"},{"name":"用电脑多","value": "6"},{"name":"体力工作多","value": "7"}
|
||||
]
|
||||
{ name: "工作时间长", value: "1" },
|
||||
{ name: "久坐", value: "2" },
|
||||
{ name: "久站", value: "3" },
|
||||
{ name: "走动多", value: "4" },
|
||||
{ name: "强度大", value: "5" },
|
||||
{ name: "用电脑多", value: "6" },
|
||||
{ name: "体力工作多", value: "7" }
|
||||
];
|
||||
|
||||
export const defecationTimeArray = [
|
||||
{"name":"上午","value": "1"},{"name":"中午","value": "2"},{"name":"晚上","value": "3"}
|
||||
]
|
||||
{ name: "上午", value: "1" },
|
||||
{ name: "中午", value: "2" },
|
||||
{ name: "晚上", value: "3" }
|
||||
];
|
||||
|
||||
export const aerobicMotionClassifyArray = [
|
||||
{"name":"跳绳","value": "1"},{"name":"跑步","value": "2"},{"name":"游泳","value": "3"}
|
||||
]
|
||||
{ name: "跳绳", value: "1" },
|
||||
{ name: "跑步", value: "2" },
|
||||
{ name: "游泳", value: "3" }
|
||||
];
|
||||
export const anaerobicMotionClassifyArray = [
|
||||
{"name":"撸铁","value": "1"},{"name":"俯卧撑","value": "2"}
|
||||
]
|
||||
{ name: "撸铁", value: "1" },
|
||||
{ name: "俯卧撑", value: "2" }
|
||||
];
|
||||
|
||||
export const anaerobicAerobicMotionClassifyArray = [
|
||||
{"name":"拳击","value": "1"},{"name":"瑜伽","value": "2"}
|
||||
]
|
||||
{ name: "拳击", value: "1" },
|
||||
{ name: "瑜伽", value: "2" }
|
||||
];
|
||||
|
||||
export const motionFieldArray = [
|
||||
{"name":"居家","value": "1"},{"name":"健身房","value": "2"},{"name":"户外","value": "3"}, {"name":"瑜伽馆","value": "4"}
|
||||
]
|
||||
{ name: "居家", value: "1" },
|
||||
{ name: "健身房", value: "2" },
|
||||
{ name: "户外", value: "3" },
|
||||
{ name: "瑜伽馆", value: "4" }
|
||||
];
|
||||
|
||||
export const sleepQualityArray = [
|
||||
{"name":"好","value": "1"},{"name":"一般","value": "2"},{"name":"入睡难","value": "3"},
|
||||
{"name":"失眠","value": "4"},{"name":"易醒","value": "5"},{"name":"多梦","value": "6"}
|
||||
]
|
||||
{ name: "好", value: "1" },
|
||||
{ name: "一般", value: "2" },
|
||||
{ name: "入睡难", value: "3" },
|
||||
{ name: "失眠", value: "4" },
|
||||
{ name: "易醒", value: "5" },
|
||||
{ name: "多梦", value: "6" }
|
||||
];
|
||||
|
||||
export const familyIllnessHistoryArray = [
|
||||
{"name":"高血压病","value": "1"},{"name":"脑卒中","value": "2"},{"name":"冠心病","value": "3"},
|
||||
{"name":"外周血管病","value": "4"},{"name":"心力衰竭","value": "5"},{"name":"冠心病","value": "6"},
|
||||
{"name":"肥胖症","value": "7"},{"name":"慢性肾脏疾病","value": "8"},{"name":"骨质疏松","value": "9"},
|
||||
{"name":"痛风","value": "10"},{"name":"精神疾病","value": "11"},{"name":"恶性肿瘤","value": "12"},
|
||||
{"name":"慢性阻塞性肺病","value": "13"},{"name":"风湿性免疫性疾病","value": "14"},
|
||||
]
|
||||
{ name: "高血压病", value: "1" },
|
||||
{ name: "脑卒中", value: "2" },
|
||||
{ name: "冠心病", value: "3" },
|
||||
{ name: "外周血管病", value: "4" },
|
||||
{ name: "心力衰竭", value: "5" },
|
||||
{ name: "冠心病", value: "6" },
|
||||
{ name: "肥胖症", value: "7" },
|
||||
{ name: "慢性肾脏疾病", value: "8" },
|
||||
{ name: "骨质疏松", value: "9" },
|
||||
{ name: "痛风", value: "10" },
|
||||
{ name: "精神疾病", value: "11" },
|
||||
{ name: "恶性肿瘤", value: "12" },
|
||||
{ name: "慢性阻塞性肺病", value: "13" },
|
||||
{ name: "风湿性免疫性疾病", value: "14" }
|
||||
];
|
||||
|
||||
export const operationHistoryArray = [
|
||||
{"name":"头颅(含脑)","value": "1"},{"name":"眼","value": "2"},{"name":"耳鼻咽喉","value": "3"},
|
||||
{"name":"颌面部及口腔","value": "4"},{"name":"颈部或甲状腺","value": "5"},{"name":"胸部(含肺部)","value": "6"},
|
||||
{"name":"心脏(含心脏介入)","value": "7"},{"name":"外周血管","value": "8"},{"name":"胃肠","value": "9"},
|
||||
{"name":"肝胆","value": "10"},{"name":"肾脏","value": "11"},{"name":"脊柱","value": "12"},
|
||||
{"name":"四肢及关节","value": "13"},{"name":"前列腺","value": "14"},{"name":"妇科","value": "15"},{"name":"乳腺","value": "16"}
|
||||
,{"name":"膀胱","value": "17"}
|
||||
]
|
||||
{ name: "头颅(含脑)", value: "1" },
|
||||
{ name: "眼", value: "2" },
|
||||
{ name: "耳鼻咽喉", value: "3" },
|
||||
{ name: "颌面部及口腔", value: "4" },
|
||||
{ name: "颈部或甲状腺", value: "5" },
|
||||
{ name: "胸部(含肺部)", value: "6" },
|
||||
{ name: "心脏(含心脏介入)", value: "7" },
|
||||
{ name: "外周血管", value: "8" },
|
||||
{ name: "胃肠", value: "9" },
|
||||
{ name: "肝胆", value: "10" },
|
||||
{ name: "肾脏", value: "11" },
|
||||
{ name: "脊柱", value: "12" },
|
||||
{ name: "四肢及关节", value: "13" },
|
||||
{ name: "前列腺", value: "14" },
|
||||
{ name: "妇科", value: "15" },
|
||||
{ name: "乳腺", value: "16" },
|
||||
{ name: "膀胱", value: "17" }
|
||||
];
|
||||
|
||||
export const longEatDrugClassifyArray = [
|
||||
{"name":"降压药","value": "1"},{"name":"降糖药","value": "2"},{"name":"降尿酸药","value": "3"},
|
||||
{"name":"抗心律失常药","value": "4"},{"name":"缓解哮喘药物","value": "5"},{"name":"抗压郁药物","value": "6"},
|
||||
{"name":"雌激素类药物","value": "7"},{"name":"利尿剂","value": "8"},{"name":"中草药","value": "9"},
|
||||
{"name":"避孕药","value": "10"},{"name":"强的松类药物","value": "11"},{"name":"镇静剂或安眠药","value": "12"},
|
||||
{"name":"调值药(降脂药)","value": "13"},{"name":"解热镇痛药(如布洛芬等)","value": "14"}
|
||||
]
|
||||
{ name: "降压药", value: "1" },
|
||||
{ name: "降糖药", value: "2" },
|
||||
{ name: "降尿酸药", value: "3" },
|
||||
{ name: "抗心律失常药", value: "4" },
|
||||
{ name: "缓解哮喘药物", value: "5" },
|
||||
{ name: "抗压郁药物", value: "6" },
|
||||
{ name: "雌激素类药物", value: "7" },
|
||||
{ name: "利尿剂", value: "8" },
|
||||
{ name: "中草药", value: "9" },
|
||||
{ name: "避孕药", value: "10" },
|
||||
{ name: "强的松类药物", value: "11" },
|
||||
{ name: "镇静剂或安眠药", value: "12" },
|
||||
{ name: "调值药(降脂药)", value: "13" },
|
||||
{ name: "解热镇痛药(如布洛芬等)", value: "14" }
|
||||
];
|
||||
|
||||
export const allergenArray = [
|
||||
{"name":"青霉素","value": "1"},{"name":"磺胺类","value": "2"},{"name":"链霉素","value": "3"},
|
||||
{"name":"头孢类","value": "4"},{"name":"鸡蛋","value": "5"},{"name":"牛奶","value": "6"},
|
||||
{"name":"海鲜","value": "7"},{"name":"花粉或尘螨","value": "8"},{"name":"粉尘","value": "9"},
|
||||
{"name":"洗洁剂","value": "10"},{"name":"化妆品","value": "11"}
|
||||
]
|
||||
export const allergenArray = [
|
||||
{ name: "青霉素", value: "1" },
|
||||
{ name: "磺胺类", value: "2" },
|
||||
{ name: "链霉素", value: "3" },
|
||||
{ name: "头孢类", value: "4" },
|
||||
{ name: "鸡蛋", value: "5" },
|
||||
{ name: "牛奶", value: "6" },
|
||||
{ name: "海鲜", value: "7" },
|
||||
{ name: "花粉或尘螨", value: "8" },
|
||||
{ name: "粉尘", value: "9" },
|
||||
{ name: "洗洁剂", value: "10" },
|
||||
{ name: "化妆品", value: "11" }
|
||||
];
|
||||
|
||||
export const makeFoodTypeArray = [
|
||||
{"name":"居家做饭","value": "1"},{"name":"外卖食堂","value": "2"},{"name":"居家和外食","value": "3"},{"name":"国外饮食","value": "4"},
|
||||
{"name":"运动饮食","value": "5"}
|
||||
]
|
||||
{ name: "居家做饭", value: "1" },
|
||||
{ name: "外卖食堂", value: "2" },
|
||||
{ name: "居家和外食", value: "3" },
|
||||
{ name: "国外饮食", value: "4" },
|
||||
{ name: "运动饮食", value: "5" }
|
||||
];
|
||||
|
||||
export const yesNoDict = { 0: "是", 1: "否" };
|
||||
export const sexDict = { 0: "男", 1: "女" };
|
||||
export const positionDict = { 0: "南方", 1: "北方" };
|
||||
export const makeFoodTypeDict = { 0: "自己做", 1: "外面吃" };
|
||||
export const makeFoodTasteDict = { 0: "清淡", 1: "重口味" };
|
||||
export const walkDict = { 0: "久坐多", 1: "走动多" };
|
||||
|
||||
export const cookingStyleRateArray = ["煎", "炸", "卤", "腌", "腊", "煲"];
|
||||
export const cookingStyleRateUnitArray = cookingStyleRateArray.map(() => "次");
|
||||
|
||||
export const drinksNumArray = [
|
||||
"老火汤",
|
||||
"咖啡",
|
||||
"浓茶",
|
||||
"奶茶",
|
||||
"冷饮",
|
||||
"碳酸饮料",
|
||||
"甜饮料",
|
||||
"鲜榨果汁"
|
||||
];
|
||||
export const drinksNumUnitArray = drinksNumArray.map(() => "次");
|
||||
|
||||
export const drinkWineAmountArray = ["白酒", "啤酒", "红酒"];
|
||||
export const drinkWineAmountUnitArray = ["两", "瓶", "毫升"];
|
||||
|
||||
export const smokeRateArray = ["每天抽烟", "烟龄", "已戒烟"];
|
||||
export const smokeRateUnitArray = ["次", "年", "年"];
|
||||
|
||||
//需要将数组转成字符串的属性名称,包含对象数组、字符串数组
|
||||
export const arrayName = [
|
||||
"condiment","cookingStyle","cookingStyleRate", "washVegetablesStyle","lunchType","dinner","dietFlavor",
|
||||
"snacks","waterType","waterHabit","drinksNum","drinkWineClassify","drinkWineAmount","smokeRate",
|
||||
"workType","defecationTime","aerobicMotionClassify","anaerobicMotionClassify","anaerobicAerobicMotionClassify",
|
||||
"motionField","sleepQuality", "physicalSignsId","moistureDate","bloodData","familyIllnessHistory", "operationHistory", "longEatDrugClassify", "allergen",
|
||||
"medicalReport","medicalReportName"
|
||||
]
|
||||
"condiment",
|
||||
"cookingStyle",
|
||||
"cookingStyleRate",
|
||||
"washVegetablesStyle",
|
||||
"lunchType",
|
||||
"dinner",
|
||||
"dietFlavor",
|
||||
"snacks",
|
||||
"waterType",
|
||||
"waterHabit",
|
||||
"drinksNum",
|
||||
"drinkWineClassify",
|
||||
"drinkWineAmount",
|
||||
"smokeRate",
|
||||
"workType",
|
||||
"defecationTime",
|
||||
"aerobicMotionClassify",
|
||||
"anaerobicMotionClassify",
|
||||
"anaerobicAerobicMotionClassify",
|
||||
"motionField",
|
||||
"sleepQuality",
|
||||
"physicalSignsId",
|
||||
"moistureDate",
|
||||
"bloodData",
|
||||
"familyIllnessHistory",
|
||||
"operationHistory",
|
||||
"longEatDrugClassify",
|
||||
"allergen",
|
||||
"medicalReport",
|
||||
"medicalReportName"
|
||||
];
|
||||
|
||||
//需要将数字下标转成中文含义的属性名
|
||||
export const needAttrName = [
|
||||
"condiment","cookingStyle", "washVegetablesStyle","breakfastType","lunchType","dinner","dietFlavor","vegetablesRateType","dietHotAndCold",
|
||||
"fruitsTime","fruitsRate","eatingSpeed",
|
||||
"snacks","waterType","waterHabit","drinkWineFlag","drinkWineClassify",
|
||||
"workType","defecationTime","aerobicMotionClassify","anaerobicMotionClassify","anaerobicAerobicMotionClassify",
|
||||
"motionField","sleepQuality", "familyIllnessHistory", "operationHistory", "longEatDrugClassify", "allergen"
|
||||
]
|
||||
"condiment",
|
||||
"cookingStyle",
|
||||
"washVegetablesStyle",
|
||||
"breakfastType",
|
||||
"lunchType",
|
||||
"dinner",
|
||||
"dietFlavor",
|
||||
"vegetablesRateType",
|
||||
"dietHotAndCold",
|
||||
"fruitsTime",
|
||||
"fruitsRate",
|
||||
"eatingSpeed",
|
||||
"snacks",
|
||||
"waterType",
|
||||
"waterHabit",
|
||||
"drinkWineFlag",
|
||||
"drinkWineClassify",
|
||||
"workType",
|
||||
"defecationTime",
|
||||
"aerobicMotionClassify",
|
||||
"anaerobicMotionClassify",
|
||||
"anaerobicAerobicMotionClassify",
|
||||
"motionField",
|
||||
"sleepQuality",
|
||||
"familyIllnessHistory",
|
||||
"operationHistory",
|
||||
"longEatDrugClassify",
|
||||
"allergen"
|
||||
];
|
||||
|
||||
export const needCombineName = [
|
||||
"cookingStyleRate",
|
||||
"drinksNum",
|
||||
"drinkWineAmount",
|
||||
"smokeRate"
|
||||
];
|
||||
|
||||
export const yesNoName = [
|
||||
"constipation",
|
||||
"staylate",
|
||||
"motion",
|
||||
"night",
|
||||
"weakness",
|
||||
"rebound",
|
||||
"crux",
|
||||
"stayupLateFlag",
|
||||
"nearOperationFlag",
|
||||
"longEatDrugFlag",
|
||||
"allergyFlag",
|
||||
"smokeFlag",
|
||||
"secondSmoke"
|
||||
];
|
||||
|
||||
export const dictName = [
|
||||
"sex",
|
||||
"position",
|
||||
"makeFoodType",
|
||||
"makeFoodTaste",
|
||||
"walk"
|
||||
];
|
||||
|
||||
export const newLineName = ["bloodData", "moistureDate"];
|
||||
|
||||
export const bloodDataArray = [
|
||||
{ value: "1", name: "1.体质虚弱,免疫力差" },
|
||||
{ value: "2", name: "2.畏寒肢冷,自汗,头晕耳鸣" },
|
||||
{ value: "3", name: "3.心悸气短,神疲乏力,气短懒言" },
|
||||
{ value: "4", name: "4.失眠多梦,健忘,精神恍惚" },
|
||||
{ value: "5", name: "5.面色淡白或萎黄,皮肤干燥,毛发枯萎" },
|
||||
{ value: "6", name: "6.女性月经量少,延期或闭经" },
|
||||
{ value: "7", name: "7.唇甲色淡,舌淡脉虚" }
|
||||
];
|
||||
|
||||
export const moistureDateArray = [
|
||||
{ value: "1", name: "1.体质虚弱,免疫力差" },
|
||||
{ value: "2", name: "2.畏寒肢冷,自汗,头晕耳鸣" },
|
||||
{ value: "3", name: "3.心悸气短,神疲乏力,气短懒言" },
|
||||
{ value: "4", name: "4.失眠多梦,健忘,精神恍惚" },
|
||||
{ value: "5", name: "5.面色淡白或萎黄,皮肤干燥,毛发枯萎" },
|
||||
{ value: "6", name: "6.女性月经量少,延期或闭经" },
|
||||
{ value: "7", name: "7.唇甲色淡,舌淡脉虚" }
|
||||
];
|
||||
|
||||
const moduleObj = {
|
||||
condimentArray,
|
||||
cookingStyleArray,
|
||||
washVegetablesStyleArray,
|
||||
breakfastTypeArray,
|
||||
lunchTypeArray,
|
||||
dinnerArray,
|
||||
dietHotAndColdArray,
|
||||
dietFlavorArray,
|
||||
vegetablesRateTypeArray,
|
||||
fruitsTimeArray,
|
||||
fruitsRateArray,
|
||||
eatingSpeedArray,
|
||||
snacksArray,
|
||||
waterTypeArray,
|
||||
waterHabitArray,
|
||||
drinkWineFlagArray,
|
||||
drinkWineClassifyArray,
|
||||
workTypeArray,
|
||||
defecationTimeArray,
|
||||
aerobicMotionClassifyArray,
|
||||
anaerobicMotionClassifyArray,
|
||||
anaerobicAerobicMotionClassifyArray,
|
||||
motionFieldArray,
|
||||
sleepQualityArray,
|
||||
familyIllnessHistoryArray,
|
||||
operationHistoryArray,
|
||||
longEatDrugClassifyArray,
|
||||
allergenArray,
|
||||
makeFoodTypeArray,
|
||||
//
|
||||
cookingStyleRateArray,
|
||||
cookingStyleRateUnitArray,
|
||||
drinksNumArray,
|
||||
drinksNumUnitArray,
|
||||
drinkWineAmountArray,
|
||||
drinkWineAmountUnitArray,
|
||||
smokeRateArray,
|
||||
smokeRateUnitArray,
|
||||
//
|
||||
yesNoDict,
|
||||
sexDict,
|
||||
positionDict,
|
||||
makeFoodTypeDict,
|
||||
makeFoodTasteDict,
|
||||
walkDict,
|
||||
//
|
||||
bloodDataArray,
|
||||
moistureDateArray
|
||||
};
|
||||
|
||||
//健康信息处理,将数组转为字符串
|
||||
export function dealHealthy(customerHealthy) {
|
||||
needAttrName.forEach(name => {
|
||||
if (customerHealthy.hasOwnProperty(name)) {
|
||||
customerHealthy[name] = (String(customerHealthy[name]) || "")
|
||||
.split(",")
|
||||
.map(val => {
|
||||
const tarObj = moduleObj[`${name}Array`].find(
|
||||
obj => obj.value === val
|
||||
);
|
||||
if (tarObj) {
|
||||
return tarObj.name;
|
||||
}
|
||||
return "";
|
||||
})
|
||||
.join(",");
|
||||
}
|
||||
});
|
||||
needCombineName.forEach(name => {
|
||||
if (customerHealthy.hasOwnProperty(name)) {
|
||||
customerHealthy[name] = (String(customerHealthy[name]) || "")
|
||||
.split(",")
|
||||
.map((val, idx) => {
|
||||
return `${moduleObj[`${name}Array`][idx]}${val}${
|
||||
moduleObj[`${name}UnitArray`][idx]
|
||||
}`;
|
||||
})
|
||||
.join(",");
|
||||
}
|
||||
});
|
||||
newLineName.forEach(name => {
|
||||
if (customerHealthy.hasOwnProperty(name)) {
|
||||
customerHealthy[name] = (String(customerHealthy[name]) || "")
|
||||
.split(",")
|
||||
.map(val => {
|
||||
const tarObj = moduleObj[`${name}Array`].find(
|
||||
obj => obj.value === val
|
||||
);
|
||||
if (tarObj) {
|
||||
return tarObj.name;
|
||||
}
|
||||
return "";
|
||||
})
|
||||
.join("</br>");
|
||||
}
|
||||
});
|
||||
yesNoName.forEach(name => {
|
||||
if (customerHealthy.hasOwnProperty(name)) {
|
||||
customerHealthy[name] = yesNoDict[customerHealthy[name]];
|
||||
}
|
||||
});
|
||||
dictName.forEach(name => {
|
||||
if (customerHealthy.hasOwnProperty(name)) {
|
||||
customerHealthy[name] = moduleObj[`${name}Dict`][customerHealthy[name]];
|
||||
}
|
||||
});
|
||||
|
||||
if (customerHealthy.hasOwnProperty("tall")) {
|
||||
customerHealthy.tall += "cm";
|
||||
}
|
||||
if (customerHealthy.hasOwnProperty("weight")) {
|
||||
customerHealthy.weight += "斤";
|
||||
}
|
||||
if (customerHealthy.hasOwnProperty("vegetableRate")) {
|
||||
customerHealthy.vegetableRate += "成";
|
||||
}
|
||||
if (customerHealthy.hasOwnProperty("stayupLateWeekNum")) {
|
||||
customerHealthy.stayupLateWeekNum += "次/周";
|
||||
}
|
||||
if (customerHealthy.hasOwnProperty("riceFull")) {
|
||||
customerHealthy.riceFull += "成";
|
||||
}
|
||||
if (customerHealthy.hasOwnProperty("connectTime")) {
|
||||
customerHealthy.connectTime += "点";
|
||||
}
|
||||
if (customerHealthy.hasOwnProperty("sleepTime")) {
|
||||
customerHealthy.sleepTime += "点";
|
||||
}
|
||||
if (customerHealthy.hasOwnProperty("getupTime")) {
|
||||
customerHealthy.getupTime += "点";
|
||||
}
|
||||
if (customerHealthy.hasOwnProperty("signList")) {
|
||||
customerHealthy.signStr = customerHealthy.signList.join(",");
|
||||
}
|
||||
|
||||
return customerHealthy;
|
||||
}
|
||||
|
88
stdiet-ui/src/views/custom/recipesBuild/BodySignView.vue
Normal file
88
stdiet-ui/src/views/custom/recipesBuild/BodySignView.vue
Normal file
@ -0,0 +1,88 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<h2>{{ this.data.name }}</h2>
|
||||
<div class="msg-info" v-for="(info, idx) in basicInfo" :key="idx">
|
||||
<text-info
|
||||
v-for="con in info"
|
||||
:title="con.title"
|
||||
:key="con.title"
|
||||
:value="data[con.value]"
|
||||
extraclass="text-info-extra"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import TextInfo from "./TextInfo.vue";
|
||||
|
||||
export default {
|
||||
name: "BodySignView",
|
||||
props: ["data"],
|
||||
components: {
|
||||
"text-info": TextInfo,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
basicInfo: [
|
||||
[
|
||||
{ title: "性别", value: "sex" },
|
||||
{ title: "年龄", value: "age" },
|
||||
],
|
||||
[
|
||||
{ title: "电话", value: "phone" },
|
||||
{ title: "地域", value: "position" },
|
||||
],
|
||||
[
|
||||
{ title: "身高", value: "tall" },
|
||||
{ title: "体重", value: "weight" },
|
||||
],
|
||||
[
|
||||
{ title: "工作职业", value: "vocation" },
|
||||
{ title: "上夜班", value: "night" },
|
||||
],
|
||||
[
|
||||
{ title: "熬夜失眠", value: "staylate" },
|
||||
{ title: "运动情况", value: "walk" },
|
||||
],
|
||||
|
||||
[
|
||||
{ title: "浑身乏力", value: "weakness" },
|
||||
{ title: "经常运动", value: "motion" },
|
||||
],
|
||||
[
|
||||
{ title: "睡觉时间", value: "sleepTime" },
|
||||
{ title: "起床时间", value: "getupTime" },
|
||||
],
|
||||
[
|
||||
{ title: "饮食方式", value: "makeFoodType" },
|
||||
{ title: "饮食特点", value: "makeFoodTaste" },
|
||||
],
|
||||
[{ title: "便秘", value: "constipation" }],
|
||||
[{ title: "饮食备注", value: "remarks" }],
|
||||
[{ title: "减脂反弹", value: "rebound" }],
|
||||
[{ title: "意识到生活习惯是减脂关键", value: "crux" }],
|
||||
[{ title: "减脂遇到的困难", value: "difficulty" }],
|
||||
[
|
||||
{ title: "湿气数据", value: "moistureDate" },
|
||||
{ title: "气血数据", value: "bloodData" },
|
||||
],
|
||||
[{ title: "病史", value: "signStr" }],
|
||||
[{ title: "忌口或过敏源", value: "dishesIngredientId" }],
|
||||
[{ title: "方便沟通时间", value: "connectTime" }],
|
||||
[{ title: "备注", value: "remark" }],
|
||||
],
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.msg-info {
|
||||
display: flex;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.text-info-extra {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
</style>
|
192
stdiet-ui/src/views/custom/recipesBuild/HealthyView.vue
Normal file
192
stdiet-ui/src/views/custom/recipesBuild/HealthyView.vue
Normal file
@ -0,0 +1,192 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<h2>{{ this.data.name }}</h2>
|
||||
<div class="msg-info" v-for="(info, idx) in basicInfo" :key="idx">
|
||||
<text-info
|
||||
v-for="con in info"
|
||||
:title="con.title"
|
||||
:key="con.title"
|
||||
:value="data[con.value]"
|
||||
extraclass="text-info-extra"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<el-collapse>
|
||||
<el-collapse-item
|
||||
v-for="item in healthyInvestigate"
|
||||
:key="item.title"
|
||||
:title="item.title"
|
||||
:name="item.title"
|
||||
>
|
||||
<div v-for="con in item.content" :key="con.value">
|
||||
<text-info
|
||||
:title="con.title"
|
||||
:value="data[con.value]"
|
||||
extraclass="text-info-extra"
|
||||
/>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import TextInfo from "./TextInfo.vue";
|
||||
|
||||
export default {
|
||||
name: "HealthyView",
|
||||
props: ["data"],
|
||||
components: {
|
||||
"text-info": TextInfo,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
basicInfo: [
|
||||
[
|
||||
{ title: "调理项目", value: "conditioningProject" },
|
||||
{ title: "电话", value: "phone" },
|
||||
],
|
||||
[
|
||||
{ title: "性别", value: "sex" },
|
||||
{ title: "年龄", value: "age" },
|
||||
],
|
||||
[
|
||||
{ title: "身高", value: "tall" },
|
||||
{ title: "体重", value: "weight" },
|
||||
],
|
||||
[{ title: "地域", value: "position" }],
|
||||
[{ title: "备注", value: "remark" }],
|
||||
],
|
||||
healthyInvestigate: [
|
||||
{
|
||||
title: "减脂经历评估",
|
||||
content: [
|
||||
{ title: "减脂经历", value: "experience" },
|
||||
{ title: "减肥遇到的困难", value: "difficulty" },
|
||||
{ title: "减脂是否反弹", value: "rebound" },
|
||||
{ title: "是否意识到生活习惯是减脂关键", value: "crux" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "食品安全评估",
|
||||
content: [
|
||||
{ title: "调味品种", value: "condiment" },
|
||||
{ title: "烹调方式", value: "cookingStyle" },
|
||||
{ title: "烹调频次", value: "cookingStyleRate" },
|
||||
{ title: "洗菜方式", value: "washVegetablesStyle" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "饮食结构评估",
|
||||
content: [
|
||||
{ title: "早餐习惯", value: "breakfastType" },
|
||||
{ title: "早餐吃的食物", value: "breakfastFood" },
|
||||
{ title: "午餐习惯", value: "lunchType" },
|
||||
{ title: "晚餐习惯", value: "dinner" },
|
||||
{ title: "正餐中素菜占比", value: "vegetableRate" },
|
||||
{ title: "最常吃的肉类", value: "commonMeat" },
|
||||
{ title: "晚餐时间", value: "dinnerTime" },
|
||||
{ title: "每周吃夜宵次数", value: "supperNum" },
|
||||
{ title: "夜宵通常吃的食物", value: "supperFood" },
|
||||
{ title: "食物的冷热偏好", value: "dietHotAndCold" },
|
||||
{ title: "食物的口味偏好", value: "dietFlavor" },
|
||||
{ title: "平均每周吃生蔬菜几次", value: "vegetablesNum" },
|
||||
{ title: "每周吃生蔬菜的频次类型", value: "vegetablesRateType" },
|
||||
{ title: "平均每天吃水果次数", value: "fruitsNum" },
|
||||
{ title: "吃水果的时间段", value: "fruitsTime" },
|
||||
{ title: "平时吃水果的频次", value: "fruitsRate" },
|
||||
{ title: "一餐吃几碗饭", value: "riceNum" },
|
||||
{ title: "吃几成饱", value: "riceFull" },
|
||||
{ title: "吃饭速度", value: "eatingSpeed" },
|
||||
{ title: "饮食特点", value: "makeFoodType" },
|
||||
{ title: "常吃的零食", value: "snacks" },
|
||||
{ title: "有无服用营养保健品", value: "healthProductsFlag" },
|
||||
{ title: "营养保健品品牌名", value: "healthProductsBrand" },
|
||||
{ title: "营养保健品产品名", value: "healthProductsName" },
|
||||
{ title: "服用营养保健品频次", value: "healthProductsWeekRate" },
|
||||
{ title: "忌口过敏食物", value: "dishesIngredient" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "生活习惯评估",
|
||||
content: [
|
||||
{ title: "每天的饮水量", value: "waterNum" },
|
||||
{ title: "喜欢喝什么水", value: "waterType" },
|
||||
{ title: "喝水习惯", value: "waterHabit" },
|
||||
{ title: "常喝的饮品的每周频次", value: "drinksNum" },
|
||||
{ title: "是否喝酒", value: "drinkWineFlag" },
|
||||
{ title: "喝酒种类", value: "drinkWineClassify" },
|
||||
{ title: "对应酒的量", value: "drinkWineAmount" },
|
||||
{ title: "是否抽烟", value: "smokeFlag" },
|
||||
{ title: "抽烟频次和烟龄", value: "smokeRate" },
|
||||
{ title: "是否经常抽二手烟", value: "secondSmoke" },
|
||||
{ title: "工作行业", value: "workIndustry" },
|
||||
{ title: "工作性质", value: "workType" },
|
||||
{ title: "排便次数", value: "defecationNum" },
|
||||
{ title: "排便时间段", value: "defecationTime" },
|
||||
{ title: "排便的形状", value: "defecationShape" },
|
||||
{ title: "排便的气味", value: "defecationSmell" },
|
||||
{ title: "排便的速度", value: "defecationSpeed" },
|
||||
{ title: "排便的颜色", value: "defecationColor" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "运动习惯评估",
|
||||
content: [
|
||||
{ title: "每周运动次数", value: "motionNum" },
|
||||
{ title: "每次运动的时长", value: "motionDuration" },
|
||||
{ title: "每天运动的时间", value: "motionTime" },
|
||||
{ title: "运动", value: "motion" },
|
||||
{ title: "运动场地", value: "motionField" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "睡眠质量评估",
|
||||
content: [
|
||||
{ title: "睡觉时间", value: "sleepTime" },
|
||||
{ title: "睡眠质量", value: "sleepQuality" },
|
||||
{ title: "是否有辅助入睡药物", value: "sleepDrugFlag" },
|
||||
{ title: "辅助睡眠类药物名称", value: "sleepDrug" },
|
||||
{ title: "是否经常熬夜", value: "stayupLateFlag" },
|
||||
{ title: "熬夜频次", value: "stayupLateWeekNum" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "既往病史/用药史评估",
|
||||
content: [
|
||||
{ title: "病史体征", value: "physicalSigns" },
|
||||
{ title: "湿气数据", value: "moistureDate" },
|
||||
{ title: "气血数据", value: "bloodData" },
|
||||
{ title: "家族疾病史", value: "familyIllnessHistory" },
|
||||
{ title: "手术史", value: "operationHistory" },
|
||||
{ title: "近期是否做过手术", value: "nearOperationFlag" },
|
||||
{ title: "手术恢复情况", value: "recoveryeSituation" },
|
||||
{ title: "是否长期服用药物", value: "longEatDrugFlag" },
|
||||
{ title: "长期服用的药物", value: "longEatDrugClassify" },
|
||||
{ title: "是否出现过过敏症状", value: "allergyFlag" },
|
||||
{ title: "过敏症状", value: "allergySituation" },
|
||||
{ title: "过敏源", value: "allergen" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "体检报告",
|
||||
content: [
|
||||
{ title: "体检报告(1)", value: "medicalReport_one" },
|
||||
{ title: "体检报告(2)", value: "medicalReport_two" },
|
||||
{ title: "体检报告(3)", value: "medicalReport_three" },
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.msg-info {
|
||||
display: flex;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.text-info-extra {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
</style>
|
52
stdiet-ui/src/views/custom/recipesBuild/TextInfo.vue
Normal file
52
stdiet-ui/src/views/custom/recipesBuild/TextInfo.vue
Normal file
@ -0,0 +1,52 @@
|
||||
<template>
|
||||
<div :class="classname">
|
||||
<span class="title">{{ title }}:</span>
|
||||
<span v-if="newLine">
|
||||
<div v-for="value in mValue" :key="value">{{ value }}</div>
|
||||
</span>
|
||||
<span v-else class="value">{{ mValue }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "TextInfo",
|
||||
data() {
|
||||
return {
|
||||
classname: `text_info_wrapper ${this.extraclass || ""}`,
|
||||
newLine: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
mValue: function () {
|
||||
if (
|
||||
this.value &&
|
||||
typeof this.value === "string" &&
|
||||
this.value.includes("</br>")
|
||||
) {
|
||||
this.newLine = true;
|
||||
return this.value.split("</br>");
|
||||
}
|
||||
return this.value;
|
||||
},
|
||||
},
|
||||
props: ["title", "value", "extraclass"],
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.text_info_wrapper {
|
||||
display: flex;
|
||||
margin-right: 24px;
|
||||
min-width: 120px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.text_info_wrapper .title {
|
||||
color: #8c8c8c;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.text_info_wrapper .value {
|
||||
/* color: #696969; */
|
||||
flex: 1;
|
||||
}
|
||||
</style>
|
67
stdiet-ui/src/views/custom/recipesBuild/index.vue
Normal file
67
stdiet-ui/src/views/custom/recipesBuild/index.vue
Normal file
@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="content">
|
||||
<div class="left">left</div>
|
||||
<div class="right">
|
||||
<HealthyView :data="healthyData" v-if="healthyDataType === 0" />
|
||||
<BodySignView :data="healthyData" v-else />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getRecipesPlan } from "@/api/custom/recipesPlan";
|
||||
import { getOrder } from "@/api/custom/order";
|
||||
import { getCustomerPhysicalSignsByCusId } from "@/api/custom/customer";
|
||||
import { dealHealthy } from "@/utils/healthyData";
|
||||
|
||||
import HealthyView from "./HealthyView";
|
||||
import BodySignView from "./BodySignView";
|
||||
|
||||
export default {
|
||||
name: "BuildRecipies",
|
||||
data() {
|
||||
return {
|
||||
healthyData: {},
|
||||
healthyDataType: 0,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
getOrder(this.cusId).then((res) => {
|
||||
if (!res.data.cusId) {
|
||||
this.$message.error("未找到用户id");
|
||||
return;
|
||||
}
|
||||
getCustomerPhysicalSignsByCusId(res.data.cusId).then((iRes) => {
|
||||
this.healthyDataType = iRes.data.type;
|
||||
this.healthyData = dealHealthy(iRes.data.customerHealthy);
|
||||
// console.log(this.healthyData);
|
||||
});
|
||||
});
|
||||
},
|
||||
components: {
|
||||
HealthyView,
|
||||
BodySignView,
|
||||
},
|
||||
props: ["id", "cusId"],
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.content {
|
||||
display: flex;
|
||||
height: calc(100vh - 124px);
|
||||
}
|
||||
.content .left {
|
||||
flex: 4;
|
||||
border-right: 1px solid rgb(0 21 41 / 8%);
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
.content .right {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
padding-left: 20px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user