From 3554bee2b3dda0c824f3a1e11a3010ff760e8cc6 Mon Sep 17 00:00:00 2001 From: huangdeliang Date: Tue, 9 Feb 2021 15:07:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A0=B7=E5=BC=8F=E9=81=AE?= =?UTF-8?q?=E6=8C=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stdiet-ui/src/views/custom/dishes/index.vue | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/stdiet-ui/src/views/custom/dishes/index.vue b/stdiet-ui/src/views/custom/dishes/index.vue index bbbc255f4..ba013d2c2 100644 --- a/stdiet-ui/src/views/custom/dishes/index.vue +++ b/stdiet-ui/src/views/custom/dishes/index.vue @@ -597,7 +597,7 @@ export default { listAllIngredient({ type: this.ingType }).then((res) => { this.open = true; this.title = "修改菜品"; - this.oriDataList = res.rows; + this.oriDataList = res.rows.concat(this.form.igdList); this.ingDataList = this.oriDataList.reduce((arr, cur) => { if (!arr.some(({ key }) => key === cur.id)) { arr.push({ @@ -606,7 +606,7 @@ export default { }); } return arr; - }, this.selIngList.slice()); + }, []); }); }); }, @@ -675,7 +675,13 @@ export default { .catch(function () {}); }, handleChange(value, direction, movedKeys) { - // console.log({oriIgdList: this.oriDataList, selIgdList: this.form.igdList}); + console.log({ + oriIgdList: this.oriDataList, + selIgdList: this.form.igdList, + ingDataList: this.ingDataList, + value, + ingType: this.ingType, + }); const newTableData = []; this.selRec = []; this.selNotRec = []; @@ -719,7 +725,7 @@ export default { }, handleOnTypeChange(value) { listAllIngredient({ type: value }).then((res) => { - this.oriDataList = res.rows; + this.oriDataList = res.rows.concat(this.form.igdList); this.ingDataList = this.oriDataList.reduce((arr, cur) => { if (!arr.some(({ key }) => key === cur.id)) { arr.push({ @@ -728,7 +734,7 @@ export default { }); } return arr; - }, this.selIngList.slice()); + }, []); }); }, handleInputChange(val) { @@ -771,6 +777,10 @@ export default { margin: 2px; } +.el-transfer-panel__list.is-filterable { + padding-bottom: 28px; +} + .cus-unit { display: inline-flex; .el-input-number--mini {