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.
3 lines
70 KiB
3 lines
70 KiB
9 months ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["server"],{"068d":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-button",{directives:[{name:"action",rawName:"v-action:add",arg:"add"}],attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")])],1),e.isLoading?e._e():t("a-table",{attrs:{rowKey:"category_id",columns:e.columns,dataSource:e.categoryList,defaultExpandAllRows:!0,expandIconColumnIndex:1,pagination:!1,loading:e.isLoading},scopedSlots:e._u([{key:"status",fn:function(a){return t("span",{},[t("a-tag",{attrs:{color:a?"green":""}},[e._v(e._s(a?"显示":"隐藏"))])],1)}},{key:"action",fn:function(a,r){return t("span",{},[[t("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(t){return e.handleEdit(r)}}},[e._v("编辑")]),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(t){return e.handleDelete(r)}}},[e._v("删除")])]],2)}}],null,!1,721492270)}),t("AddForm",{ref:"AddForm",on:{handleSubmit:e.handleRefresh}}),t("EditForm",{ref:"EditForm",on:{handleSubmit:e.handleRefresh}})],1)},i=[],n=a("c7eb"),o=a("1da1"),s=(a("d3b7"),a("41ed")),l=a("2af9"),c=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:"新增服务分类",width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"分类名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),t("a-form-item",{attrs:{label:"分类图片",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["image_id"],expression:"['image_id']"}]})],1),t("a-form-item",{attrs:{label:"状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"用户端是否展示"}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:1,rules:[{required:!0}]}],expression:"['status', { initialValue: 1, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:1}},[e._v("显示")]),t("a-radio",{attrs:{value:0}},[e._v("隐藏")])],1)],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入至少1个数字"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入至少1个数字' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},u=[],d={components:{SelectImage:l["i"]},props:{},data:function(){return{title:"",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this)}},methods:{add:function(){this.visible=!0},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){e||t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,s["a"]({form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(e){t.confirmLoading=!1}))}}},m=d,f=a("2877"),p=Object(f["a"])(m,c,u,!1,null,null,null),h=p.exports,v=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:"编辑服务分类",width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confi
|
||
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||
|
i=function(){return t};var e,t={},a=Object.prototype,n=a.hasOwnProperty,o=Object.defineProperty||function(e,t,a){e[t]=a.value},s="function"==typeof Symbol?Symbol:{},l=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function d(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,a){return e[t]=a}}function m(e,t,a,r){var i=t&&t.prototype instanceof y?t:y,n=Object.create(i.prototype),s=new $(r||[]);return o(n,"_invoke",{value:R(e,a,s)}),n}function f(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}t.wrap=m;var p="suspendedStart",h="suspendedYield",v="executing",g="completed",b={};function y(){}function C(){}function _(){}var w={};d(w,l,(function(){return this}));var x=Object.getPrototypeOf,L=x&&x(x(O([])));L&&L!==a&&n.call(L,l)&&(w=L);var S=_.prototype=y.prototype=Object.create(w);function q(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function a(i,o,s,l){var c=f(e[i],e,o);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==Object(r["a"])(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){a("next",e,s,l)}),(function(e){a("throw",e,s,l)})):t.resolve(d).then((function(e){u.value=e,s(u)}),(function(e){return a("throw",e,s,l)}))}l(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,i){a(e,r,t,i)}))}return i=i?i.then(n,n):n()}})}function R(t,a,r){var i=p;return function(n,o){if(i===v)throw new Error("Generator is already running");if(i===g){if("throw"===n)throw o;return{value:e,done:!0}}for(r.method=n,r.arg=o;;){var s=r.delegate;if(s){var l=I(s,r);if(l){if(l===b)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=v;var c=f(t,a,r);if("normal"===c.type){if(i=r.done?g:h,c.arg===b)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=g,r.method="throw",r.arg=c.arg)}}}function I(t,a){var r=a.method,i=t.iterator[r];if(i===e)return a.delegate=null,"throw"===r&&t.iterator["return"]&&(a.method="return",a.arg=e,I(t,a),"throw"===a.method)||"return"!==r&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var n=f(i,t.iterator,a.arg);if("throw"===n.type)return a.method="throw",a.arg=n.arg,a.delegate=null,b;var o=n.arg;return o?o.done?(a[t.resultName]=o.value,a.next=t.nextLoc,"return"!==a.method&&(a.method="next",a.arg=e),a.delegate=null,b):o:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,b)}function F(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 V(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function $(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(F,this),this.reset(!0)}function O(t){if(t||""===t){var a=t[l];if(a)return a.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function a(){for(;++i<t.length;)if(n.call(t,i))return a.value=t[i],a.done=!1,a;return a.value=e,a.done=!0,a};return o.next=o}}throw new TypeError(Object(r["a"])(t)+" is not iterable")}return C.prototype=_,o(S,"constructor",{value:_,configurable:!0}),o(_,"constructor",{value:C,configurable:!0}),C.displayName=d(_,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===C||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,d(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},q(k.prototype),d(k.prototype,c,(function(){return this})),t.AsyncIterator=k,t.async=function(e,a,r,i,n){void 0===n&&(n=Promise);var o=new k(m(e,a,r,i),n);return t.isGeneratorFunction(a)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},q(S),d(S,u,"Generat
|