From fc9086103f88a889c78a5c7b02348a32e9a054f5 Mon Sep 17 00:00:00 2001 From: huangdeliang Date: Wed, 10 Mar 2021 19:10:57 +0800 Subject: [PATCH] =?UTF-8?q?1=EF=BC=8C=E4=BF=9D=E6=8C=81=E5=AD=97=E4=BD=93?= =?UTF-8?q?=202=EF=BC=8C=E6=9B=BF=E6=8D=A2=E8=8F=9C=E5=93=81=E6=97=B6?= =?UTF-8?q?=E5=A4=87=E6=B3=A8=203=EF=BC=8C=E4=BF=AE=E5=A4=8D=E6=9C=AA?= =?UTF-8?q?=E7=94=9F=E6=88=90=E9=A3=9F=E8=B0=B1=E6=97=B6=E5=A4=9A=E6=AC=A1?= =?UTF-8?q?=E7=B2=98=E8=B4=B4=E5=90=8E=E5=88=A0=E9=99=A4=E5=85=A8=E5=88=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stdiet-ui/src/components/OrderAdd/index.vue | 2 +- .../src/components/OrderDrawer/index.vue | 2 +- stdiet-ui/src/components/OrderEdit/index.vue | 2 +- stdiet-ui/src/store/modules/recipes.js | 7 +++-- .../foodHeatStatistics/investigate/index.vue | 2 +- stdiet-ui/src/views/custom/order/index.vue | 2 +- .../RecipesView/RecipesAspectCom/index.vue | 16 +++++++++--- .../RecipesView/RecipesCom/index.vue | 26 ++++++++++++++++--- .../PlanDrawer/ShoppingPlanDrawer/index.vue | 2 +- 9 files changed, 47 insertions(+), 14 deletions(-) diff --git a/stdiet-ui/src/components/OrderAdd/index.vue b/stdiet-ui/src/components/OrderAdd/index.vue index 5c1faa71e..09bc56ee7 100644 --- a/stdiet-ui/src/components/OrderAdd/index.vue +++ b/stdiet-ui/src/components/OrderAdd/index.vue @@ -670,7 +670,7 @@ export default { } }, handleOrderTypeChange() { - console.log(this.form.orderTypeList); + // console.log(this.form.orderTypeList); }, }, watch: { diff --git a/stdiet-ui/src/components/OrderDrawer/index.vue b/stdiet-ui/src/components/OrderDrawer/index.vue index 75e2b6430..b9d63ebae 100644 --- a/stdiet-ui/src/components/OrderDrawer/index.vue +++ b/stdiet-ui/src/components/OrderDrawer/index.vue @@ -170,7 +170,7 @@ export default { } return arr; }, []); - console.log(this.orderList); + // console.log(this.orderList); this.visible = true; }); diff --git a/stdiet-ui/src/components/OrderEdit/index.vue b/stdiet-ui/src/components/OrderEdit/index.vue index 72849f5f8..9e63f1f5a 100644 --- a/stdiet-ui/src/components/OrderEdit/index.vue +++ b/stdiet-ui/src/components/OrderEdit/index.vue @@ -569,7 +569,7 @@ export default { }; // console.log(this.form); this.resetForm("form"); - console.log("--"+obj.orderType); + // console.log("--"+obj.orderType); this.onSaleShow = this.form.orderType == "2"; this.afterSaleNutriAssShow = this.form.orderType != "2" && this.form.afterSaleCommissOrder == 0; this.planOperatorShow = this.form.afterSaleCommissOrder == 0; diff --git a/stdiet-ui/src/store/modules/recipes.js b/stdiet-ui/src/store/modules/recipes.js index 1211d4ad0..ed39f67f8 100644 --- a/stdiet-ui/src/store/modules/recipes.js +++ b/stdiet-ui/src/store/modules/recipes.js @@ -33,7 +33,7 @@ const oriState = { templateInfo: undefined, copyData: undefined, canCopyMenuTypes: [], - fontSize: 12 + fontSize: parseInt(localStorage.getItem("fontSize")) || 12 }; const mutations = { @@ -45,6 +45,7 @@ const mutations = { ); if (tarDishes) { if (actionType === "replace") { + tarDishes.remark = ""; // 替换菜品,修改类型 Object.keys(payload.data).forEach(key => { tarDishes[key] = payload.data[key]; @@ -69,6 +70,7 @@ const mutations = { }, updateFontSize(state, payload) { state.fontSize = payload.fontSize; + localStorage.setItem("fontSize", payload.fontSize); }, addRecipesDishes(state, payload) { state.recipesData[payload.num].dishes.push(payload.data); @@ -299,7 +301,7 @@ const actions = { // console.log(params); }, async addDishes({ commit, state }, payload) { - console.log(payload); + // console.log(payload); const tarDishesList = state.recipesData[payload.num].dishes.filter( obj => obj.type === payload.data.type ); @@ -366,6 +368,7 @@ const actions = { params.remark = payload.remark; } else if (actionType === "replace") { params.dishesId = payload.data.dishesId; + params.remark = ""; params.detail = payload.data.igdList.map(igd => ({ id: igd.id, weight: igd.weight, diff --git a/stdiet-ui/src/views/custom/foodHeatStatistics/investigate/index.vue b/stdiet-ui/src/views/custom/foodHeatStatistics/investigate/index.vue index d5f765c42..ab0943827 100644 --- a/stdiet-ui/src/views/custom/foodHeatStatistics/investigate/index.vue +++ b/stdiet-ui/src/views/custom/foodHeatStatistics/investigate/index.vue @@ -247,7 +247,7 @@ } }); this.ingredientArray.splice(tagIndex, 1); - console.log( JSON.stringify(this.ingredientArray)) + // console.log( JSON.stringify(this.ingredientArray)) } }, created() { diff --git a/stdiet-ui/src/views/custom/order/index.vue b/stdiet-ui/src/views/custom/order/index.vue index bcdb7e88e..b5f513682 100644 --- a/stdiet-ui/src/views/custom/order/index.vue +++ b/stdiet-ui/src/views/custom/order/index.vue @@ -636,7 +636,7 @@ export default { this.searchOrderTypeArray != null ? encodeURIComponent(JSON.stringify(this.searchOrderTypeArray)) : null; - console.log(this.queryParams.searchOrderTypeArray); + // console.log(this.queryParams.searchOrderTypeArray); //this.dealOrderTypeArray(); listOrder(this.addDateRange(this.queryParams, this.daterange)).then( (response) => { diff --git a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesAspectCom/index.vue b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesAspectCom/index.vue index dbe86dd81..1e54da651 100644 --- a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesAspectCom/index.vue +++ b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesAspectCom/index.vue @@ -142,6 +142,8 @@ export default { loading: false, mFontSize: 12, fontSizeOpts: [ + { value: 8, label: "8" }, + { value: 10, label: "10" }, { value: 12, label: "12" }, { value: 14, label: "14" }, { value: 16, label: "16" }, @@ -149,17 +151,25 @@ export default { ], }; }, + mounted() { + // this.mFontSize = parseInt(localStorage.getItem("fontSize")) || 12; + // this.updateFontSize({fontSize:}) + }, updated() { // console.log(this.data); + if (this.fontSize !== this.mFontSize) { + this.mFontSize = this.fontSize; + // console.log(this.fontSize); + } }, props: ["collapse", "data"], computed: { ...mapState(["recipesId", "reviewStatus", "healthyData", "fontSize"]), }, watch: { - fontSize(val) { - this.mFontSize = val; - }, + // fontSize(val) { + // this.mFontSize = val; + // }, }, methods: { handleOnSizeChange(fontSize) { 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 121079fee..cd3d93d5f 100644 --- a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/index.vue +++ b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/index.vue @@ -401,12 +401,18 @@ export default { } return arr; }, []); - console.log(mData); + // console.log(mData); return mData; }, ...mapGetters(["typeDict"]), - ...mapState(["currentDay", "copyData", "fontSize", "canCopyMenuTypes"]), + ...mapState([ + "currentDay", + "copyData", + "fontSize", + "canCopyMenuTypes", + "recipesId", + ]), }, methods: { cellClassName({ row, column, rowIndex, columnIndex }) { @@ -470,9 +476,17 @@ export default { handleOnPaste(type) { // console.log(this.copyData); if (this.copyData) { + const data = { + ...this.copyData, + type, + }; + if (!this.recipesId) { + // 未生成食谱时拷贝 + data.id = new Date().getTime(); + } this.addDishes({ num: this.num, - data: { ...this.copyData, type }, + data, }).catch((err) => { this.$message.error(err); }); @@ -624,6 +638,12 @@ export default { color: #595959; } +.recipes_cell_8 { + font-size: 8px; +} +.recipes_cell_10 { + font-size: 10px; +} .recipes_cell_12 { font-size: 12px; } diff --git a/stdiet-ui/src/views/custom/recipesShow/PlanDrawer/ShoppingPlanDrawer/index.vue b/stdiet-ui/src/views/custom/recipesShow/PlanDrawer/ShoppingPlanDrawer/index.vue index dc8cbfbed..0134ba2e0 100644 --- a/stdiet-ui/src/views/custom/recipesShow/PlanDrawer/ShoppingPlanDrawer/index.vue +++ b/stdiet-ui/src/views/custom/recipesShow/PlanDrawer/ShoppingPlanDrawer/index.vue @@ -147,7 +147,7 @@ export default { }, {} ); - console.log(this.shoppingCart); + // console.log(this.shoppingCart); }, handleOnBackClick() { this.visible = false;