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
12 KiB
2 lines
12 KiB
3 years ago
|
"use strict";(self["webpackChunkeatwhat_admin"]=self["webpackChunkeatwhat_admin"]||[]).push([[462],{1603:function(e,t,i){i.r(t),i.d(t,{default:function(){return g}});var r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-card",[i("div",{staticClass:"ingredient"},[i("div",{staticClass:"title"},[i("el-alert",{attrs:{title:"食材管理界面",type:"success",center:"",closable:!1}})],1),i("div",{staticClass:"btn"},[i("el-button",{attrs:{type:"primary",size:"small",round:"",icon:"el-icon-plus"},on:{click:function(t){e.addIngredientDialogVisible=!0}}},[e._v("添加新食材")])],1),i("div",{staticClass:"table"},[i("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":"🥶正在努力加载中..."}},[i("el-table-column",{attrs:{label:"食材名称",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.ingreName||"未知")+" ")]}}])}),i("el-table-column",{attrs:{label:"图片",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-image",{staticStyle:{width:"100px",height:"100px"},attrs:{src:t.row.ingrePut,"preview-src-list":e.ingredientImgs}},[i("div",{staticClass:"image-slot",attrs:{slot:"error"},slot:"error"},[i("i",{staticClass:"el-icon-picture-outline"})])])]}}])}),i("el-table-column",{attrs:{label:"产地",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.ingreAdd||"未知")+" ")]}}])}),i("el-table-column",{attrs:{label:"属性",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.ingreAttr||"未知")+" ")]}}])}),i("el-table-column",{attrs:{label:"价格",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.ingrePrice||"0")+" 元 ")]}}])}),i("el-table-column",{attrs:{align:"center"},scopedSlots:e._u([{key:"header",fn:function(t){return[i("el-input",{attrs:{size:"mini",placeholder:"输入食材名称搜索"},model:{value:e.ingredientSearch,callback:function(t){e.ingredientSearch=t},expression:"ingredientSearch"}})]}},{key:"default",fn:function(t){return[i("el-button",{attrs:{type:"primary",size:"mini",plain:""},on:{click:function(i){return e.showUpdateIngredient(t.row.ingreId)}}},[e._v("编辑")]),i("el-popconfirm",{staticStyle:{"margin-left":"5px"},attrs:{title:"确定删除该食材?此操作不可逆"},on:{confirm:function(i){return e.deleteIngredient(t.row.ingreId)}}},[i("el-button",{attrs:{slot:"reference",type:"danger",size:"mini",plain:""},slot:"reference"},[e._v("删除")])],1)]}}])})],1)],1)]),i("el-dialog",{attrs:{title:"添加食材",visible:e.addIngredientDialogVisible,width:"40%",center:!0},on:{"update:visible":function(t){e.addIngredientDialogVisible=t},close:e.addIngredientDialogClosed}},[i("el-form",{ref:"addIngredientFormRef",attrs:{model:e.addIngredientForm,"label-width":"80px",size:"small",rules:e.addIngredientFormRules}},[i("el-form-item",{attrs:{label:"食材名称",prop:"ingreName"}},[i("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),i("el-form-item",{attrs:{label:"食材产地",prop:"ingreAdd"}},[i("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),i("el-form-item",{attrs:{label:"食材属性",prop:"ingreAttr"}},[i("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.76d402db.js.map
|