diff --git a/stdiet-ui/src/store/modules/recipes.js b/stdiet-ui/src/store/modules/recipes.js
index e03bd6c20..03fd59638 100644
--- a/stdiet-ui/src/store/modules/recipes.js
+++ b/stdiet-ui/src/store/modules/recipes.js
@@ -36,7 +36,10 @@ const oriState = {
fontSize: parseInt(localStorage.getItem("fontSize")) || 12,
dishBigClassOptions: [],
dishSmallClassOptions: [],
- leftShow: false
+ //
+ leftShow: false,
+ notRecIgds: [],
+ igdTypeOptions: []
};
const mutations = {
@@ -64,7 +67,7 @@ const mutations = {
payload.cusWeight && (tarIgd.cusWeight = payload.cusWeight);
payload.cusUnit && (tarIgd.cusUnit = payload.cusUnit);
}
- console.log(JSON.parse(JSON.stringify(state.recipesData)));
+ // console.log(JSON.parse(JSON.stringify(state.recipesData)));
} else if (actionType === "delIgd") {
tarDishes.igdList = tarDishes.igdList.filter(
igd => igd.id !== payload.igdId
@@ -103,6 +106,9 @@ const mutations = {
toggleLeftShow(state, payload) {
state.leftShow = !state.leftShow;
},
+ setNotRecIgds(state, payload) {
+ state.notRecIgds = payload.data;
+ },
setDate(state, payload) {
state.startDate = payload.startDate;
state.endDate = payload.endDate;
@@ -152,6 +158,9 @@ const actions = {
getDicts("dish_class_small").then(response => {
commit("updateStateData", { dishSmallClassOptions: response.data });
});
+ getDicts("cus_ing_type").then(response => {
+ commit("updateStateData", { igdTypeOptions: response.data });
+ });
return new Promise((res, rej) => {
// 健康数据
@@ -559,6 +568,19 @@ const getters = {
});
return arr;
}, []),
+ igdTypeDetial: state =>
+ state.recipesData.reduce((obj, cur) => {
+ cur.dishes.forEach(dObj => {
+ dObj.igdList.forEach(iObj => {
+ if (!obj[iObj.type]) {
+ obj[iObj.type] = [{ name: iObj.name, id: iObj.id }];
+ } else if (!obj[iObj.type].some(tObj => tObj.id === iObj.id)) {
+ obj[iObj.type].push({ name: iObj.name, id: iObj.id });
+ }
+ });
+ });
+ return obj;
+ }, {}),
cusUnitDict: state =>
state.cusUnitOptions.reduce((obj, cur) => {
obj[cur.dictValue] = cur.dictLabel;
@@ -583,6 +605,11 @@ const getters = {
state.dishSmallClassOptions.reduce((obj, cur) => {
obj[cur.dictValue] = cur.dictLabel;
return obj;
+ }, {}),
+ igdTypeDict: state =>
+ state.igdTypeOptions.reduce((obj, cur) => {
+ obj[cur.dictValue] = cur.dictLabel;
+ return obj;
}, {})
};
diff --git a/stdiet-ui/src/utils/healthyData.js b/stdiet-ui/src/utils/healthyData.js
index c788249c5..509d7ecbf 100644
--- a/stdiet-ui/src/utils/healthyData.js
+++ b/stdiet-ui/src/utils/healthyData.js
@@ -598,6 +598,11 @@ export function dealHealthy(customerHealthy) {
? `,${customerHealthy.otherMotionField}`
: "";
}
+ if (customerHealthy.hasOwnProperty("otherOperationHistory")) {
+ customerHealthy.operationHistory += customerHealthy.otherOperationHistory
+ ? `,${customerHealthy.otherOperationHistory}`
+ : "";
+ }
if (customerHealthy.hasOwnProperty("defecationNum")) {
customerHealthy.defecationNum += "次/天";
}
diff --git a/stdiet-ui/src/views/custom/dishes/index.vue b/stdiet-ui/src/views/custom/dishes/index.vue
index 481200bda..b01a02a5b 100644
--- a/stdiet-ui/src/views/custom/dishes/index.vue
+++ b/stdiet-ui/src/views/custom/dishes/index.vue
@@ -12,12 +12,13 @@
v-model="queryParams.name"
placeholder="请输入菜品名称"
clearable
- size="small"
+ size="mini"
@keyup.enter.native="handleQuery"
/>
-
+
- {{dishClassFormat(scope.row)}}
+ {{ dishClassFormat(scope.row) }}
@@ -199,7 +200,7 @@
:options="dishClassOptions"
:props="{ expandTrigger: 'hover' }"
placeholder="请选择菜品种类"
- >
+ >
@@ -464,8 +465,8 @@ export default {
//
cusWeightOptions: [],
dishClassOptions: [],
- dishClassBigOptions:[],
- dishClassSmallOptions:[],
+ dishClassBigOptions: [],
+ dishClassSmallOptions: [],
// 查询参数
queryParams: {
pageNum: 1,
@@ -473,14 +474,14 @@ export default {
name: null,
type: null,
bigClass: null,
- smallClass: null
+ smallClass: null,
},
// 表单参数
form: {},
// 表单校验
rules: {},
//菜品种类查询种类
- dishClassQueryParam:[]
+ dishClassQueryParam: [],
};
},
created() {
@@ -512,9 +513,12 @@ export default {
/** 查询菜品列表 */
getList() {
this.loading = true;
- if(this.dishClassQueryParam != null && this.dishClassQueryParam.length > 0){
+ if (
+ this.dishClassQueryParam != null &&
+ this.dishClassQueryParam.length > 0
+ ) {
this.queryParams.smallClass = this.dishClassQueryParam[1];
- }else{
+ } else {
this.queryParams.smallClass = null;
}
listDishes(this.queryParams).then((response) => {
@@ -549,23 +553,25 @@ export default {
});
},
//处理菜品大类小类的关系
- dealDishClassBigAndSmall(){
+ dealDishClassBigAndSmall() {
this.dishClassBigOptions.forEach((item, index) => {
- this.dishClassOptions.push({
- 'value': parseInt(item.dictValue),
- 'label': item.dictLabel,
- 'children': []
+ this.dishClassOptions.push({
+ value: parseInt(item.dictValue),
+ label: item.dictLabel,
+ children: [],
+ });
+ if (index == this.dishClassBigOptions.length - 1) {
+ this.dishClassSmallOptions.forEach((smallClass, i) => {
+ if (smallClass.remark) {
+ this.dishClassOptions[
+ parseInt(smallClass.remark - 1)
+ ].children.push({
+ value: parseInt(smallClass.dictValue),
+ label: smallClass.dictLabel,
+ });
+ }
});
- if(index == this.dishClassBigOptions.length - 1){
- this.dishClassSmallOptions.forEach((smallClass, i) => {
- if(smallClass.remark){
- this.dishClassOptions[parseInt(smallClass.remark-1)].children.push({
- 'value': parseInt(smallClass.dictValue),
- 'label': smallClass.dictLabel
- });
- }
- });
- }
+ }
});
},
// 菜品类型字典翻译
@@ -587,13 +593,19 @@ export default {
return this.selectDictLabel(this.reviewStatusOptions, row.area);
},
//菜品种类翻译
- dishClassFormat(row){
- if(row.bigClass > 0 && row.smallClass > 0){
- let bigClassName = this.selectDictLabel(this.dishClassBigOptions, row.bigClass);
- let smallClassName = this.selectDictLabel(this.dishClassSmallOptions, row.smallClass);
- return bigClassName+"/"+smallClassName;
- }
- return "";
+ dishClassFormat(row) {
+ if (row.bigClass > 0 && row.smallClass > 0) {
+ let bigClassName = this.selectDictLabel(
+ this.dishClassBigOptions,
+ row.bigClass
+ );
+ let smallClassName = this.selectDictLabel(
+ this.dishClassSmallOptions,
+ row.smallClass
+ );
+ return bigClassName + "/" + smallClassName;
+ }
+ return "";
},
// 取消按钮
cancel() {
@@ -606,7 +618,7 @@ export default {
id: null,
name: null,
type: [],
- dishClass:[],
+ dishClass: [],
methods: null,
createBy: null,
createTime: null,
@@ -834,7 +846,7 @@ export default {
(arr, cur, idx) => {
if (idx > 1) {
if (idx === 6) {
- arr[6] = arr[3] * 4 + arr[4] * 9 + arr[5] * 4 + ' kcal';
+ arr[6] = arr[3] * 4 + arr[4] * 9 + arr[5] * 4 + " kcal";
} else {
arr[idx] = data.reduce((acc, dAcc) => {
if (idx === 2) {
diff --git a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/AddDishesDrawer/ConfigDishes.vue b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/AddDishesDrawer/ConfigDishes.vue
index 8fa47026c..069c2516f 100644
--- a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/AddDishesDrawer/ConfigDishes.vue
+++ b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/AddDishesDrawer/ConfigDishes.vue
@@ -1,5 +1,5 @@
-
+
{{
name
diff --git a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/AddDishesDrawer/SelectDishes.vue b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/AddDishesDrawer/SelectDishes.vue
index e2ae176a2..6da82ef87 100644
--- a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/AddDishesDrawer/SelectDishes.vue
+++ b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/AddDishesDrawer/SelectDishes.vue
@@ -1,60 +1,71 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
-
- 重置
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+
+ 重置
+
+
+
+
-
+
@@ -109,7 +123,7 @@ import AutoHideInfo from "@/components/AutoHideInfo";
import AutoHideMessage from "@/components/AutoHideMessage";
import { listDishes } from "@/api/custom/dishes";
import { createNamespacedHelpers } from "vuex";
-const { mapState,mapGetters } = createNamespacedHelpers("recipes");
+const { mapState, mapGetters } = createNamespacedHelpers("recipes");
export default {
name: "SelectDishes",
props: [],
@@ -129,14 +143,19 @@ export default {
reviewStatus: "yes",
},
//菜品种类查询参数
- dishClassQueryParam:[]
+ dishClassQueryParam: [],
};
},
components: {
- AutoHideInfo,AutoHideMessage
+ AutoHideInfo,
+ AutoHideMessage,
},
computed: {
- ...mapState(["typeOptions","dishBigClassOptions","dishSmallClassOptions"]),
+ ...mapState([
+ "typeOptions",
+ "dishBigClassOptions",
+ "dishSmallClassOptions",
+ ]),
...mapGetters(["dishClassOptions"]),
},
methods: {
@@ -146,9 +165,12 @@ export default {
this.lockType = true;
this.queryParams.type = type;
}
- if(this.dishClassQueryParam != null && this.dishClassQueryParam.length > 0){
+ if (
+ this.dishClassQueryParam != null &&
+ this.dishClassQueryParam.length > 0
+ ) {
this.queryParams.smallClass = this.dishClassQueryParam[1];
- }else{
+ } else {
this.queryParams.smallClass = null;
}
this.loading = true;
@@ -213,13 +235,19 @@ export default {
.map((type) => this.selectDictLabel(this.typeOptions, type));
},
//菜品种类翻译
- dishClassFormat(row){
- if(row.bigClass > 0 && row.smallClass > 0){
- let bigClassName = this.selectDictLabel(this.dishBigClassOptions, row.bigClass);
- let smallClassName = this.selectDictLabel(this.dishSmallClassOptions, row.smallClass);
- return bigClassName+"/"+smallClassName;
- }
- return "";
+ dishClassFormat(row) {
+ if (row.bigClass > 0 && row.smallClass > 0) {
+ let bigClassName = this.selectDictLabel(
+ this.dishBigClassOptions,
+ row.bigClass
+ );
+ let smallClassName = this.selectDictLabel(
+ this.dishSmallClassOptions,
+ row.smallClass
+ );
+ return bigClassName + "/" + smallClassName;
+ }
+ return "";
},
},
};
diff --git a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/EditableText/index.vue b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/EditableText/index.vue
index a1f8f1414..5d72163cb 100644
--- a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/EditableText/index.vue
+++ b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/EditableText/index.vue
@@ -9,7 +9,7 @@
:step="5"
:value="value"
@blur="handleOnBlur"
- @keydown.enter.native="handleEnterClick"
+ @keydown="handleOnKeydown"
/>
@@ -43,8 +43,11 @@ export default {
this.$message.error("数字必须大于0");
}
},
- handleEnterClick(e) {
- e.target.blur();
+ handleOnKeydown(e) {
+ // console.log(e);
+ if (e.keyCode === 13) {
+ e.target.blur();
+ }
},
},
};
diff --git a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/index.vue b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/index.vue
index 61c43d3ae..bb57c4067 100644
--- a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/index.vue
+++ b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/index.vue
@@ -47,7 +47,7 @@
-
+
-
+
diff --git a/stdiet-ui/src/views/custom/recipesBuild/VerifyView/index.vue b/stdiet-ui/src/views/custom/recipesBuild/VerifyView/index.vue
index e0baf0641..d5ae09756 100644
--- a/stdiet-ui/src/views/custom/recipesBuild/VerifyView/index.vue
+++ b/stdiet-ui/src/views/custom/recipesBuild/VerifyView/index.vue
@@ -1,6 +1,6 @@
-
忌口
+
病理忌口
涉及食材
+
+
{{ igdTypeDict[key] }}
+
+ {{ item.name }}
+
+
+