添加营养师评论功能
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
placement="right"
|
||||
trigger="click"
|
||||
width="400"
|
||||
title="备注"
|
||||
:title="title"
|
||||
@hide="handleOnHide"
|
||||
>
|
||||
<el-input
|
||||
@ -15,7 +15,7 @@
|
||||
maxlength="300"
|
||||
show-word-limit
|
||||
/>
|
||||
<span slot="reference" class="trigger">备注: </span>
|
||||
<span slot="reference" class="trigger">{{ title }}:</span>
|
||||
</el-popover>
|
||||
<div class="content">
|
||||
<span v-if="newLine">
|
||||
@ -35,6 +35,10 @@ export default {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: "备注",
|
||||
},
|
||||
},
|
||||
components: {},
|
||||
data() {
|
||||
|
@ -21,6 +21,12 @@
|
||||
:value.sync="data.avoidFood"
|
||||
@onConfirm="handleOnConfirm"
|
||||
/>
|
||||
<RemarkCom
|
||||
v-if="dev"
|
||||
title="营养师点评"
|
||||
:value.sync="data.recipesPlanRemark"
|
||||
@onConfirm="handleOnRemarkConfirm"
|
||||
/>
|
||||
</div>
|
||||
<el-collapse>
|
||||
<el-collapse-item
|
||||
@ -57,6 +63,7 @@ import TextInfo from "@/components/TextInfo";
|
||||
import ACFCom from "./ACFCom";
|
||||
import RemarkCom from "./RemarkCom";
|
||||
import { updateHealthy } from "@/api/custom/healthy";
|
||||
import { updateRecipesPlan } from "@/api/custom/recipesPlan";
|
||||
|
||||
export default {
|
||||
name: "HealthyView",
|
||||
@ -121,7 +128,7 @@ export default {
|
||||
{ title: "过敏源", value: "allergen" },
|
||||
],
|
||||
},
|
||||
{
|
||||
{
|
||||
title: "运动习惯评估",
|
||||
content: [
|
||||
{ title: "每周运动次数", value: "motionNum" },
|
||||
@ -238,6 +245,18 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
handleOnRemarkConfirm(data) {
|
||||
const { pathname } = window.location;
|
||||
const recipesId = pathname.substring(pathname.lastIndexOf("/") + 1);
|
||||
updateRecipesPlan({
|
||||
id: recipesId,
|
||||
...data,
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success("修改成功");
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user