修复菜品修改问题
This commit is contained in:
parent
afb7465281
commit
1775b657a7
@ -21,8 +21,6 @@ public class SysDishesIngredient extends SysIngredient {
|
||||
|
||||
private Long cusUnit;
|
||||
|
||||
// private BigDecimal cusWeight;
|
||||
|
||||
private Integer cusWeight;
|
||||
|
||||
private BigDecimal weight;
|
||||
|
@ -36,6 +36,9 @@
|
||||
<result property="area" column="area"/>
|
||||
<result property="rec" column="rec"/>
|
||||
<result property="notRec" column="not_rec"/>
|
||||
<result property="cusWeight" column="cus_weight" />
|
||||
<result property="cusUnit" column="cus_unit" />
|
||||
<result property="weight" column="weight" />
|
||||
</resultMap>
|
||||
|
||||
<select id="selectSysRecipesByRecipesId" parameterType="Long" resultMap="SysRecipesResult">
|
||||
|
8
stdiet-ui/src/api/custom/recipes.js
Normal file
8
stdiet-ui/src/api/custom/recipes.js
Normal file
@ -0,0 +1,8 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
export function getRecipes(id) {
|
||||
return request({
|
||||
url: "/recipes/" + id,
|
||||
method: "get"
|
||||
});
|
||||
}
|
@ -413,7 +413,7 @@ export default {
|
||||
});
|
||||
this.getDicts("cus_account").then((response) => {
|
||||
this.accountIdOptions = response.data;
|
||||
console.log(response.data);
|
||||
// console.log(response.data);
|
||||
this.accountIdOptions.splice(0, 0, {
|
||||
dictLabel: "无",
|
||||
dictValue: "0",
|
||||
@ -559,7 +559,7 @@ export default {
|
||||
accountId,
|
||||
...obj,
|
||||
};
|
||||
console.log(this.form);
|
||||
// console.log(this.form);
|
||||
this.resetForm("form");
|
||||
},
|
||||
handleOnClosed() {
|
||||
@ -600,7 +600,7 @@ export default {
|
||||
watch: {
|
||||
// 监听收款账号的变化
|
||||
"form.accountId": function (newVal, oldVal) {
|
||||
console.log("updte");
|
||||
// console.log("updte");
|
||||
this.initPlanningAndOperation();
|
||||
},
|
||||
},
|
||||
|
@ -162,10 +162,10 @@ export default {
|
||||
});
|
||||
},
|
||||
changeShowModule(){
|
||||
console.log("---------------");
|
||||
// console.log("---------------");
|
||||
for(var i = 0; i < this.stepArray.length; i++){
|
||||
let flag = this.showModuleArray.find((opt) => opt === i);
|
||||
console.log(flag != null && flag != undefined);
|
||||
// console.log(flag != null && flag != undefined);
|
||||
this.$set(this.stepArray, i, (flag != null && flag != undefined));
|
||||
}
|
||||
}
|
||||
|
87
stdiet-ui/src/components/RecipesCom/index.vue
Normal file
87
stdiet-ui/src/components/RecipesCom/index.vue
Normal file
@ -0,0 +1,87 @@
|
||||
<template>
|
||||
<div class="main">
|
||||
<div class="aspect">指标</div>
|
||||
<div class="recipes">
|
||||
<el-table :data="mData" border :span-method="spanMethod" size="mini">
|
||||
<el-table-column :label="`${name}第${num}天`"></el-table-column>
|
||||
<el-table-column label="菜品" prop="name"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "RecipesCom",
|
||||
props: {
|
||||
data: {
|
||||
type: Array,
|
||||
default: [],
|
||||
required: true,
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
num: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
},
|
||||
components: {},
|
||||
mounted() {
|
||||
// console.log(this.data);
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {
|
||||
mData() {
|
||||
if (!this.data.dishes) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const mData = this.data.dishes.reduce((arr, cur) => {
|
||||
if (cur.id > 0) {
|
||||
cur.igdList.forEach((igd) => {
|
||||
if (igd.id > 0) {
|
||||
const tarDetail = cur.detail.find((det) => det.id == igd.id);
|
||||
arr.push({
|
||||
id: cur.id,
|
||||
name: cur.name,
|
||||
type: cur.type,
|
||||
isMain: cur.isMain,
|
||||
methods: cur.methods,
|
||||
igdId: igd.id,
|
||||
igdName: igd.name,
|
||||
proteinRatio: igd.proteinRatio,
|
||||
fatRatio: igd.fatRatio,
|
||||
carbonRatio: igd.carbonRatio,
|
||||
rec: igd.rec,
|
||||
notRec: igd.notRec,
|
||||
weight: tarDetail ? tarDetail.weight : igd.weight,
|
||||
cusWeight: tarDetail ? tarDetail.cus_weight : igd.cusWeight,
|
||||
cusUnit: tarDetail ? tarDetail.cus_unit : igd.cusUnit,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
return arr;
|
||||
}, []);
|
||||
// console.log(mData);
|
||||
return mData;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
spanMethod({ row, column, rowIndex, columnIndex }) {},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
.main {
|
||||
.aspect {
|
||||
}
|
||||
|
||||
.recipies {
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,25 +0,0 @@
|
||||
<template>
|
||||
<div class="main">
|
||||
<div class="aspect">指标</div>
|
||||
<div class="recipes">食谱</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "RecipesView",
|
||||
components: {},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
.main {
|
||||
.aspect {
|
||||
}
|
||||
|
||||
.recipies {
|
||||
}
|
||||
}
|
||||
</style>
|
@ -35,7 +35,7 @@ export default {
|
||||
if (typeof val !== 'string') return
|
||||
const themeCluster = this.getThemeCluster(val.replace('#', ''))
|
||||
const originalCluster = this.getThemeCluster(oldVal.replace('#', ''))
|
||||
console.log(themeCluster, originalCluster)
|
||||
// console.log(themeCluster, originalCluster)
|
||||
|
||||
const $message = this.$message({
|
||||
message: ' Compiling the theme',
|
||||
|
@ -2,10 +2,12 @@ import { getOrder } from "@/api/custom/order";
|
||||
import { getCustomerPhysicalSignsByCusId } from "@/api/custom/customer";
|
||||
import { dealHealthy } from "@/utils/healthyData";
|
||||
import { getRecipesPlan } from "@/api/custom/recipesPlan";
|
||||
import { getRecipes } from "@/api/custom/recipes";
|
||||
|
||||
const oriState = {
|
||||
healthyData: {},
|
||||
healthyDataType: 0
|
||||
healthyDataType: 0,
|
||||
recipesData: []
|
||||
};
|
||||
|
||||
const mutations = {
|
||||
@ -13,8 +15,11 @@ const mutations = {
|
||||
state.healthyDataType = payload.healthyDataType;
|
||||
state.healthyData = payload.healthyData;
|
||||
},
|
||||
setRecipesData(state, payload) {
|
||||
state.recipesData = payload.recipesData;
|
||||
},
|
||||
clean(state) {
|
||||
console.log("clean");
|
||||
// console.log("clean");
|
||||
Object.keys(oriState).forEach(key => {
|
||||
state[key] = oriState[key];
|
||||
});
|
||||
@ -28,14 +33,30 @@ const actions = {
|
||||
throw new Error("未找到用户id");
|
||||
}
|
||||
|
||||
// 健康数据
|
||||
const healthyDataResult = await getCustomerPhysicalSignsByCusId(
|
||||
orderResult.data.cusId
|
||||
);
|
||||
// 设置健康数据
|
||||
commit("setHealtyData", {
|
||||
healthyDataType: healthyDataResult.data.type,
|
||||
healthyData: dealHealthy(healthyDataResult.data.customerHealthy)
|
||||
});
|
||||
if (healthyDataResult.code === 200) {
|
||||
commit("setHealtyData", {
|
||||
healthyDataType: healthyDataResult.data.type,
|
||||
healthyData: dealHealthy(healthyDataResult.data.customerHealthy)
|
||||
});
|
||||
} else {
|
||||
throw new Error(healthyDataResult.msg);
|
||||
}
|
||||
|
||||
// 食谱数据
|
||||
if (payload.recipesId) {
|
||||
const recipesDataResult = await getRecipes(payload.recipesId);
|
||||
if (recipesDataResult.code === 200) {
|
||||
commit("setRecipesData", {
|
||||
recipesData: recipesDataResult.data
|
||||
});
|
||||
} else {
|
||||
throw new Error(recipesDataResult.msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -550,7 +550,9 @@ export function dealHealthy(customerHealthy) {
|
||||
customerHealthy.getupTime += "点";
|
||||
}
|
||||
if (customerHealthy.hasOwnProperty("signList")) {
|
||||
customerHealthy.signStr = customerHealthy.signList.join(",");
|
||||
customerHealthy.signStr = customerHealthy.signList
|
||||
.map(obj => obj.name)
|
||||
.join(",");
|
||||
}
|
||||
|
||||
return customerHealthy;
|
||||
|
@ -463,7 +463,7 @@ export default {
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
if (response != null && response.code === 200) {
|
||||
this.form.imgUrl = response.fileName;
|
||||
console.log(response);
|
||||
// console.log(response);
|
||||
} else {
|
||||
this.fail();
|
||||
this.$message.error(response.msg);
|
||||
|
@ -166,7 +166,7 @@
|
||||
getList() {
|
||||
this.loading = true;
|
||||
const dateRange = [dayjs(this.month).startOf('month').format('YYYY-MM-DD'), dayjs(this.month).endOf('month').format('YYYY-MM-DD')];
|
||||
console.log(dateRange)
|
||||
// console.log(dateRange)
|
||||
detailCommision(this.addDateRange(this.queryParams, dateRange)).then(response => {
|
||||
this.commisionList = response.rows;
|
||||
this.total = response.total;
|
||||
|
@ -215,7 +215,7 @@
|
||||
getList() {
|
||||
this.loading = true;
|
||||
const dateRange = [dayjs(this.month).startOf('month').format('YYYY-MM-DD'), dayjs(this.month).endOf('month').format('YYYY-MM-DD')];
|
||||
console.log(dateRange)
|
||||
// console.log(dateRange)
|
||||
detailDayCommision(this.addDateRange(this.queryParams, dateRange)).then(response => {
|
||||
this.commisionList = response.rows;
|
||||
this.total = response.total;
|
||||
|
@ -482,13 +482,13 @@ export default {
|
||||
this.$refs["cusContractDrawerRef"].showDrawer(row);
|
||||
},
|
||||
handleOnBodySignClick(row) {
|
||||
console.log(row);
|
||||
// console.log(row);
|
||||
},
|
||||
handleOnHealthSignClick(row) {
|
||||
this.$refs["physicalSignsDialogRef"].showDialog(row);
|
||||
},
|
||||
handleOnMenuClick(row) {
|
||||
console.log(row);
|
||||
// console.log(row);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
|
@ -169,12 +169,12 @@
|
||||
<div class="drawer_content">
|
||||
<el-row class="content_detail">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-col span="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="菜品名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入菜品名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="菜品类型" prop="type">
|
||||
<el-select
|
||||
v-model="form.type"
|
||||
@ -190,7 +190,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否主食" prop="type">
|
||||
<el-radio-group v-model="form.isMain">
|
||||
<el-radio :label="0">是</el-radio>
|
||||
@ -198,7 +198,7 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="食材" prop="ingIds">
|
||||
<el-transfer
|
||||
style="text-align: left; display: inline-block"
|
||||
@ -237,7 +237,7 @@
|
||||
</el-transfer>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="分量" prop="weight">
|
||||
<el-table
|
||||
:data="selTableData"
|
||||
@ -259,7 +259,7 @@
|
||||
:min="0.5"
|
||||
/> -->
|
||||
<el-select size="mini" v-model="scope.row.cusWeight">
|
||||
<el-option
|
||||
<el-option
|
||||
v-for="dict in cusWeightOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
@ -286,7 +286,7 @@
|
||||
controls-position="right"
|
||||
@change="handleInputChange"
|
||||
:min="0"
|
||||
step="50"
|
||||
:step="50"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -301,7 +301,7 @@
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="推荐人群">
|
||||
<el-tag
|
||||
style="margin-right: 4px"
|
||||
@ -313,7 +313,7 @@
|
||||
</el-tag>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="忌口人群">
|
||||
<el-tag
|
||||
style="margin-right: 4px"
|
||||
@ -325,7 +325,7 @@
|
||||
</el-tag>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核状态" prop="reviewStatus">
|
||||
<el-select
|
||||
v-model="form.reviewStatus"
|
||||
@ -341,7 +341,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="做法" prop="methods">
|
||||
<el-input
|
||||
v-model="form.methods"
|
||||
@ -448,7 +448,7 @@ export default {
|
||||
this.getDicts("cus_cus_unit").then((response) => {
|
||||
this.cusUnitOptions = response.data;
|
||||
});
|
||||
this.getDicts("cus_cus_weight").then((response) => {
|
||||
this.getDicts("cus_cus_weight").then((response) => {
|
||||
this.cusWeightOptions = response.data;
|
||||
});
|
||||
this.getDicts("cus_review_status").then((response) => {
|
||||
@ -485,7 +485,7 @@ export default {
|
||||
notRecTags,
|
||||
};
|
||||
});
|
||||
console.log(this.dishesList);
|
||||
// console.log(this.dishesList);
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
@ -614,10 +614,15 @@ export default {
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.form.igdList = this.selTableData;
|
||||
this.form.type = this.form.type.join(",");
|
||||
if (this.form.id != null) {
|
||||
updateDishes(this.form).then((response) => {
|
||||
if (!this.selTableData.length) {
|
||||
this.$message.error("食材不能为空");
|
||||
return;
|
||||
}
|
||||
const data = JSON.parse(JSON.stringify(this.form));
|
||||
data.igdList = this.selTableData;
|
||||
data.type = data.type.join(",");
|
||||
if (data.id != null) {
|
||||
updateDishes(data).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
@ -625,7 +630,7 @@ export default {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addDishes(this.form).then((response) => {
|
||||
addDishes(data).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
@ -727,7 +732,7 @@ export default {
|
||||
});
|
||||
},
|
||||
handleInputChange(val) {
|
||||
console.log({ val, table: this.selTableData });
|
||||
// console.log({ val, table: this.selTableData });
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
@ -755,13 +760,12 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style >
|
||||
/**
|
||||
/deep/ :focus {
|
||||
outline: 0;
|
||||
}
|
||||
*/
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
#el-drawer__title {
|
||||
& > span:focus {
|
||||
outline: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.el-transfer-panel__filter {
|
||||
margin: 2px;
|
||||
@ -769,66 +773,68 @@ export default {
|
||||
|
||||
.cus-unit {
|
||||
display: inline-flex;
|
||||
}
|
||||
.el-input-number--mini {
|
||||
width: 38px;
|
||||
}
|
||||
|
||||
.cus-unit .el-input-number--mini {
|
||||
width: 38px;
|
||||
}
|
||||
.el-input-number {
|
||||
.el-input-number__decrease {
|
||||
display: none;
|
||||
}
|
||||
.el-input-number__increase {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cus-unit .el-input-number .el-input-number__decrease {
|
||||
display: none;
|
||||
}
|
||||
.el-input {
|
||||
width: 38px;
|
||||
}
|
||||
|
||||
.cus-unit .el-input-number .el-input-number__increase {
|
||||
display: none;
|
||||
}
|
||||
.el-input .el-input__inner {
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
border: unset;
|
||||
border-bottom: 1px solid #dcdfe6;
|
||||
}
|
||||
}
|
||||
|
||||
.cus-unit .el-input-number .el-input {
|
||||
width: 38px;
|
||||
}
|
||||
.el-select {
|
||||
.el-input__suffix {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cus-unit .el-input-number .el-input .el-input__inner {
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
border: unset;
|
||||
border-bottom: 1px solid #dcdfe6;
|
||||
}
|
||||
|
||||
.cus-unit .el-select .el-input__suffix {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cus-unit .el-select .el-input__inner {
|
||||
padding: 0 4px;
|
||||
/* border: unset; */
|
||||
text-align: center;
|
||||
.el-input__inner {
|
||||
padding: 0 4px;
|
||||
/* border: unset; */
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.weight {
|
||||
width: 70px;
|
||||
}
|
||||
|
||||
.weight .el-input .el-input__inner {
|
||||
padding: 0 32px 0 4px;
|
||||
.el-input .el-input__inner {
|
||||
padding: 0 32px 0 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.drawer_content {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.drawer_content .content_detail {
|
||||
flex: 1 1 0;
|
||||
padding: 12px;
|
||||
overflow: auto;
|
||||
}
|
||||
.content_detail {
|
||||
flex: 1 1 0;
|
||||
padding: 12px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.drawer_content .dialog-footer {
|
||||
flex: 0 0 45px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
padding: 0 12px;
|
||||
.dialog-footer {
|
||||
flex: 0 0 45px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
padding: 0 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -703,7 +703,7 @@
|
||||
detailHealthy.condiment += detailHealthy.otherCondiment ? (","+detailHealthy.otherCondiment) : "";
|
||||
//烹饪
|
||||
let cookingStyleRate = "";
|
||||
console.log(detailHealthy.cookingStyleRate);
|
||||
// console.log(detailHealthy.cookingStyleRate);
|
||||
if(detailHealthy.cookingStyleRate != null){
|
||||
detailHealthy.cookingStyleRate.split(",").forEach(function(item, index){
|
||||
cookingStyleRate += (cookingStyleRate != "" ? "," : "") + (healthyData["cookingStyleRateArray"][index])+item +"次";
|
||||
|
@ -365,7 +365,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
onSubmit() {
|
||||
console.log("submit!");
|
||||
// console.log("submit!");
|
||||
},
|
||||
/** 查询体征列表 */
|
||||
getPhysicalSignsList() {
|
||||
@ -402,7 +402,7 @@ export default {
|
||||
cusMessage.connectTime = cusMessage.connectTime.substring(0, 2);
|
||||
addCustomer(cusMessage).then((response) => {
|
||||
if (response.code === 200) {
|
||||
console.log("成功");
|
||||
// console.log("成功");
|
||||
this.$notify({
|
||||
title: "提交成功",
|
||||
message: "",
|
||||
@ -439,7 +439,7 @@ export default {
|
||||
},
|
||||
beforeCreate() {
|
||||
document.title = this.$route.meta.title;
|
||||
console.log(this.$route.meta.title);
|
||||
// console.log(this.$route.meta.title);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -705,10 +705,10 @@ export default {
|
||||
.catch(function () {});
|
||||
},
|
||||
handleStatusClick(data) {
|
||||
console.log(data);
|
||||
// console.log(data);
|
||||
},
|
||||
orderPauseManage(order) {
|
||||
console.log(order.orderId);
|
||||
// console.log(order.orderId);
|
||||
this.pauseTitle = order.customer;
|
||||
this.orderPauseId = order.orderId;
|
||||
this.openPause = true;
|
||||
|
@ -316,7 +316,7 @@
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
console.log(this.queryParams.pauseStartDate);
|
||||
// console.log(this.queryParams.pauseStartDate);
|
||||
//this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
@ -356,7 +356,7 @@
|
||||
if (valid) {
|
||||
this.form.pauseStartDate = dayjs(this.dateScope[0]).format("YYYY-MM-DD");
|
||||
this.form.pauseEndDate = dayjs(this.dateScope[1]).format("YYYY-MM-DD");
|
||||
console.log(this.form.pauseStartDate + "-" + this.form.pauseEndDate);
|
||||
// console.log(this.form.pauseStartDate + "-" + this.form.pauseEndDate);
|
||||
if (this.form.id != null) {
|
||||
updatePause(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
|
@ -64,10 +64,8 @@ export default {
|
||||
[{ title: "减脂反弹", value: "rebound" }],
|
||||
[{ title: "意识到生活习惯是减脂关键", value: "crux" }],
|
||||
[{ title: "减脂遇到的困难", value: "difficulty" }],
|
||||
[
|
||||
{ title: "湿气数据", value: "moistureDate" },
|
||||
{ title: "气血数据", value: "bloodData" },
|
||||
],
|
||||
[{ title: "湿气数据", value: "moistureDate" }],
|
||||
[{ title: "气血数据", value: "bloodData" }],
|
||||
[{ title: "病史", value: "signStr" }],
|
||||
[{ title: "忌口或过敏源", value: "dishesIngredientId" }],
|
||||
[{ title: "方便沟通时间", value: "connectTime" }],
|
||||
|
17
stdiet-ui/src/views/custom/recipesBuild/RecipesView.vue
Normal file
17
stdiet-ui/src/views/custom/recipesBuild/RecipesView.vue
Normal file
@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<div>
|
||||
<RecipesCom v-for="item in data" :key="item.id" :data="item" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import RecipesCom from "@/components/RecipesCom";
|
||||
export default {
|
||||
name: "RecipesView",
|
||||
components: {
|
||||
RecipesCom,
|
||||
},
|
||||
props: ["data"],
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
</style>
|
@ -46,7 +46,7 @@ export default {
|
||||
|
||||
.value {
|
||||
/* color: #696969; */
|
||||
flex: 1;
|
||||
flex: 1 1 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="content">
|
||||
<div class="left">left</div>
|
||||
<div class="left">
|
||||
<RecipesView :data="recipesData" />
|
||||
</div>
|
||||
<div class="right">
|
||||
<HealthyView :data="healthyData" v-if="healthyDataType === 0" />
|
||||
<BodySignView :data="healthyData" v-else />
|
||||
@ -18,6 +20,7 @@ const { mapActions, mapState, mapMutations } = createNamespacedHelpers(
|
||||
|
||||
import HealthyView from "./HealthyView";
|
||||
import BodySignView from "./BodySignView";
|
||||
import RecipesView from "./RecipesView";
|
||||
|
||||
export default {
|
||||
name: "BuildRecipies",
|
||||
@ -26,11 +29,11 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
//
|
||||
console.log({
|
||||
cusId: this.cusId,
|
||||
recipesId: this.recipesId,
|
||||
});
|
||||
this.init({ cusId: this.cusId }).catch((err) => {
|
||||
// console.log({
|
||||
// cusId: this.cusId,
|
||||
// recipesId: this.recipesId,
|
||||
// });
|
||||
this.init({ cusId: this.cusId, recipesId: this.recipesId }).catch((err) => {
|
||||
this.$message.error(err.message);
|
||||
});
|
||||
},
|
||||
@ -41,12 +44,14 @@ export default {
|
||||
components: {
|
||||
HealthyView,
|
||||
BodySignView,
|
||||
RecipesView,
|
||||
},
|
||||
props: ["planId", "cusId", "recipesId"],
|
||||
computed: {
|
||||
...mapState({
|
||||
healthyData: (state) => state.healthyData,
|
||||
healthyDataType: (state) => state.healthyDataType,
|
||||
recipesData: (state) => state.recipesData,
|
||||
}),
|
||||
},
|
||||
methods: {
|
||||
|
@ -612,7 +612,7 @@ export default {
|
||||
}
|
||||
// test
|
||||
// params.recipesId = "61";
|
||||
path += '/61';
|
||||
path += '/73';
|
||||
// this.$router.push({
|
||||
// name: "build",
|
||||
// params,
|
||||
|
@ -266,7 +266,7 @@ export default {
|
||||
});
|
||||
},
|
||||
fail(){
|
||||
console.log("定时--------");
|
||||
// console.log("定时--------");
|
||||
this.submitFlag = false;
|
||||
},
|
||||
nextStep(step){
|
||||
|
@ -452,7 +452,7 @@
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
console.log(this.form)
|
||||
// console.log(this.form)
|
||||
if (this.form.id != null) {
|
||||
updateWxUserLog(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user