You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
13 KiB
2 lines
13 KiB
2 years ago
|
"use strict";(self["webpackChunkeatwhat_admin"]=self["webpackChunkeatwhat_admin"]||[]).push([[462],{1603:function(e,t,r){r.r(t),r.d(t,{default:function(){return c}});var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-card",[r("div",{staticClass:"ingredient"},[r("div",{staticClass:"title"},[r("el-alert",{attrs:{title:"食材管理界面",type:"success",center:"",closable:!1}})],1),r("div",{staticClass:"btn"},[r("el-button",{attrs:{type:"primary",size:"small",round:"",icon:"el-icon-plus"},on:{click:function(t){e.addIngredientDialogVisible=!0}}},[e._v("添加新食材")])],1),r("div",{staticClass:"table"},[r("el-table",{staticStyle:{width:"100%"},attrs:{data:e.ingredient.filter((function(t){return!e.ingredientSearch||t.ingreName.toLowerCase().includes(e.ingredientSearch.toLowerCase())})),fit:"",lazy:"",stripe:!0,border:!0,"highlight-current-row":!0,"empty-text":"🥶正在努力加载中..."}},[r("el-table-column",{attrs:{label:"食材名称",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.ingreName||"未知")+" ")]}}])}),r("el-table-column",{attrs:{label:"图片",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-image",{staticStyle:{width:"100px",height:"100px"},attrs:{src:t.row.ingrePut,"preview-src-list":e.ingredientImgs}},[r("div",{staticClass:"image-slot",attrs:{slot:"error"},slot:"error"},[r("i",{staticClass:"el-icon-picture-outline"})])])]}}])}),r("el-table-column",{attrs:{label:"产地",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.ingreAdd||"未知")+" ")]}}])}),r("el-table-column",{attrs:{label:"属性",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.ingreAttr||"未知")+" ")]}}])}),r("el-table-column",{attrs:{label:"价格",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.ingrePrice||"0")+" 元 ")]}}])}),r("el-table-column",{attrs:{align:"center"},scopedSlots:e._u([{key:"header",fn:function(t){return[r("el-input",{attrs:{size:"mini",placeholder:"输入食材名称搜索"},model:{value:e.ingredientSearch,callback:function(t){e.ingredientSearch=t},expression:"ingredientSearch"}})]}},{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"primary",size:"mini",plain:""},on:{click:function(r){return e.showUpdateIngredient(t.row.ingreId)}}},[e._v("编辑")]),r("el-popconfirm",{staticStyle:{"margin-left":"5px"},attrs:{title:"确定删除该食材?此操作不可逆"},on:{confirm:function(r){return e.deleteIngredient(t.row.ingreId)}}},[r("el-button",{attrs:{slot:"reference",type:"danger",size:"mini",plain:""},slot:"reference"},[e._v("删除")])],1)]}}])})],1)],1)]),r("el-dialog",{attrs:{title:"添加食材",visible:e.addIngredientDialogVisible,width:"40%",center:!0},on:{"update:visible":function(t){e.addIngredientDialogVisible=t},close:e.addIngredientDialogClosed}},[r("el-form",{ref:"addIngredientFormRef",attrs:{model:e.addIngredientForm,"label-width":"80px",size:"small",rules:e.addIngredientFormRules}},[r("el-form-item",{attrs:{label:"食材名称",prop:"ingreName"}},[r("el-input",{attrs:{"prefix-icon":"el-icon-watermelon",autocomplete:"off",maxlength:"50",clearable:!0},model:{value:e.addIngredientForm.ingreName,callback:function(t){e.$set(e.addIngredientForm,"ingreName",t)},expression:"addIngredientForm.ingreName"}})],1),r("el-form-item",{attrs:{label:"食材产地",prop:"ingreAdd"}},[r("el-cascader",{staticStyle:{width:"100%"},attrs:{options:e.citys,filterable:"",clearable:"",props:{expandTrigger:"hover"}},model:{value:e.addIngredientForm.ingreAdd,callback:function(t){e.$set(e.addIngredientForm,"ingreAdd",t)},expression:"addIngredientForm.ingreAdd"}})],1),r("el-form-item",{attrs:{label:"食材属性",prop:"ingreAttr"}},[r("el-select",{attrs:{filterable:"",clearable:"",placeholder:"请选择食材属性"},model:{value:e.addIngredientForm.ingreAttr,callback:function(t){e.$set(e.addIngredientForm,"ingreAttr",t)},expression:"addIngredientForm.ingreAttr"}},e._l(e.ingreAttrs,(function(e){retur
|
||
|
//# sourceMappingURL=462-legacy.187cab03.js.map
|