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.

4 lines
24 KiB

(self["webpackChunkeatwhat_admin"]=self["webpackChunkeatwhat_admin"]||[]).push([[339],{7339:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return m}});var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-card",[n("div",{staticClass:"menu"},[n("div",{staticClass:"title"},[n("el-alert",{attrs:{title:"菜谱管理界面",type:"success",center:"",closable:!1}})],1),n("div",{staticClass:"btn"},[n("el-button",{attrs:{type:"primary",size:"small",round:"",icon:"el-icon-plus"},on:{click:e.addMenuClick}},[e._v("添加新菜谱")])],1),n("div",{staticClass:"table"},[n("el-table",{staticStyle:{width:"100%"},attrs:{data:e.menu.filter((function(t){return!e.menuSearch||t.menuName.toLowerCase().includes(e.menuSearch.toLowerCase())})),fit:"",lazy:"",stripe:!0,border:!0,"highlight-current-row":!0,"empty-text":"🥶正在努力加载中..."}},[n("el-table-column",{attrs:{type:"expand"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("div",{staticClass:"desc"},[n("div",{staticClass:"desc-title"},[n("span",[e._v("描述信息:")])]),n("div",{staticClass:"brief"},[e._v(e._s(t.row.menuBrief||"暂无"))])])]}}])}),n("el-table-column",{attrs:{label:"菜谱名称",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.menuName||"未知")+" ")]}}])}),n("el-table-column",{attrs:{label:"图片",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-image",{staticStyle:{width:"100px",height:"100px"},attrs:{src:t.row.menuPut,"preview-src-list":e.menuImgs}},[n("div",{staticClass:"image-slot",attrs:{slot:"error"},slot:"error"},[n("i",{staticClass:"el-icon-picture-outline"})])])]}}])}),n("el-table-column",{attrs:{label:"组成",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.menuEle||"未知")+" ")]}}])}),n("el-table-column",{attrs:{label:"口味",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.menuTaste||"未知")+" ")]}}])}),n("el-table-column",{attrs:{label:"菜系",align:"center",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.menuCuis||"未知")+" ")]}}])}),n("el-table-column",{attrs:{label:"难度",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-rate",{attrs:{disabled:"","text-color":"#ff9900"},model:{value:t.row.menuLevel,callback:function(n){e.$set(t.row,"menuLevel",n)},expression:"scope.row.menuLevel"}})]}}])}),n("el-table-column",{attrs:{label:"价格",align:"center",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.menuPrice)+" 元 ")]}}])}),n("el-table-column",{attrs:{align:"center"},scopedSlots:e._u([{key:"header",fn:function(t){return[n("el-input",{attrs:{size:"mini",placeholder:"输入菜谱名称搜索"},model:{value:e.menuSearch,callback:function(t){e.menuSearch=t},expression:"menuSearch"}})]}},{key:"default",fn:function(t){return[n("el-button",{attrs:{type:"primary",size:"mini",plain:""},on:{click:function(n){return e.showUpdateMenu(t.row.menuId)}}},[e._v("编辑")]),n("el-popconfirm",{staticStyle:{"margin-left":"5px"},attrs:{title:"确定删除该菜谱?此操作不可逆"},on:{confirm:function(n){return e.deleteMenu(t.row.menuId)}}},[n("el-button",{attrs:{slot:"reference",type:"danger",size:"mini",plain:""},slot:"reference"},[e._v("删除")])],1)]}}])})],1)],1)]),n("el-dialog",{attrs:{title:"添加菜谱",visible:e.addMenuDialogVisible,width:"40%",center:!0},on:{"update:visible":function(t){e.addMenuDialogVisible=t},close:e.addMenuDialogClosed}},[n("el-form",{ref:"addMenuFormRef",attrs:{model:e.addMenuForm,"label-width":"80px",size:"small",rules:e.addMenuFormRules}},[n("el-form-item",{attrs:{label:"菜谱名称",prop:"menuName"}},[n("el-input",{attrs:{"prefix-icon":"el-icon-food",autocomplete:"off",maxlength:"50",clearable:!0},model:{value:e.addMenuForm.menuName,callback:function(t){e.$set(e.addMenuForm,"menuName",t)},expression:"addMenuForm.menuName"}})],1),n("el-form-item",{attrs:{label:"菜谱组成"}},[e._l(e.dynamicIngredientTags,(funct
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
a=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",o=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(L){s=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var a=t&&t.prototype instanceof p?t:p,i=Object.create(a.prototype),u=new I(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(a,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw i;return C()}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var l=M(u,n);if(l){if(l===d)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var o=m(e,t,n);if("normal"===o.type){if(r=n.done?"completed":"suspendedYield",o.arg===d)continue;return{value:o.arg,done:n.done}}"throw"===o.type&&(r="completed",n.method="throw",n.arg=o.arg)}}}(e,n,u),i}function m(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(L){return{type:"throw",arg:L}}}e.wrap=c;var d={};function p(){}function f(){}function h(){}var g={};s(g,u,(function(){return this}));var v=Object.getPrototypeOf,b=v&&v(v(F([])));b&&b!==t&&n.call(b,u)&&(g=b);var y=h.prototype=p.prototype=Object.create(g);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function a(i,u,l,o){var s=m(e[i],e,u);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==(0,r.Z)(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){a("next",e,l,o)}),(function(e){a("throw",e,l,o)})):t.resolve(d).then((function(e){c.value=e,l(c)}),(function(e){return a("throw",e,l,o)}))}o(s.arg)}var i;this._invoke=function(e,n){function r(){return new t((function(t,r){a(e,n,t,r)}))}return i=i?i.then(r,r):r()}}function M(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator["return"]&&(t.method="return",t.arg=void 0,M(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=m(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function F(e){if(e){var t=e[u];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:C}}function C(){return{value:void 0,done:!0}}return f.prototype=h,s(y,"constructor",h),s(h,"constructor",f),f.displayName=s(h,o,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,s(e,o,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},x(w.prototype),s(w.prototype,l,(function(){return this})),e.AsyncIterator=w,e.async=function(t,n,r,a,i){void 0===i&&(i=Promise);var u=new w(c(t,n,r,a),i);return e.isGeneratorFunction(n)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},x(y),s(y,o,"Generator"),s(y,u,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),e.keys=
//# sourceMappingURL=339-legacy.a053f65a.js.map