新增食谱制作时按病症筛选功能

This commit is contained in:
huangdeliang
2021-04-27 11:55:11 +08:00
parent a45060a87c
commit a24a9e8674
20 changed files with 275 additions and 174 deletions

View File

@ -52,6 +52,20 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="推荐体征" prop="physical">
<el-cascader
:disabled="lockType"
v-model="queryParams.physical"
placeholder="请选择推荐体征"
clearable
:options="physicalSignsOptions"
size="mini"
width="120px"
@change="handleOnPhysicalSignsChange"
/>
</el-form-item>
</el-col>
<el-form-item>
<el-button
type="cyan"
@ -71,7 +85,7 @@
v-loading="loading"
size="mini"
:data="dishesList"
height="600"
height="550"
highlight-current-row
@current-change="handleCurrentChange"
>
@ -141,6 +155,7 @@ export default {
smallClass: null,
bigClass: null,
reviewStatus: "yes",
physical: null,
},
//菜品种类查询参数
dishClassQueryParam: [],
@ -155,6 +170,7 @@ export default {
"typeOptions",
"dishBigClassOptions",
"dishSmallClassOptions",
"physicalSignsOptions",
]),
...mapGetters(["dishClassOptions"]),
},
@ -174,7 +190,13 @@ export default {
this.queryParams.smallClass = null;
}
this.loading = true;
listDishes(this.queryParams).then((result) => {
const qParams = {
...this.queryParams,
};
if (this.queryParams.physical) {
qParams.physical = this.queryParams.physical[1];
}
listDishes(qParams).then((result) => {
this.dishesList = result.rows.map((d) => {
const recTags = [],
notRecTags = [];
@ -249,6 +271,10 @@ export default {
}
return "";
},
handleOnPhysicalSignsChange(val) {
const [typeId, id] = val;
console.log(val);
},
},
};
</script>