Commit 5d6506ac by 曾经

no message

parent 8b84500b
.list-group[data-v-239e3f0c]{max-height:516px;padding-bottom:20px;overflow-y:auto}.list-group-item[data-v-239e3f0c]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-right:10px}.list-group-item+.list-group-item[data-v-239e3f0c]{margin-top:20px}.list-group-item .el-form-item[data-v-239e3f0c]{margin-bottom:0}.list-group-item .el-form-item .show-name[data-v-239e3f0c]{width:430px;height:32px;padding-left:11px;color:#303133;font-size:14px;line-height:32px;background:#f2f3f7;border-radius:2px;cursor:default}.list-group-item .icon-span[data-v-239e3f0c]{display:inline-block;width:24px;height:24px;line-height:24px;text-align:center;cursor:pointer}.list-group-item .icon-span[data-v-239e3f0c]:hover{background:#f2f3f7;border-radius:2px}.list-group-item .icon-span+.icon-span[data-v-239e3f0c]{margin-left:4px}.list-group-item .icon-span i.iconfont-components3[data-v-239e3f0c]{color:#303133}.list-group-item .handle.icon-cp-tuozhuaipaixu[data-v-239e3f0c]{margin-left:4px}.list-group-item .handle.icon-cp-tuozhuaipaixu[data-v-239e3f0c]:hover{cursor:move;color:#2f54eb}.category-dialog-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.category-dialog{margin:0!important;padding:0 4px 4px;max-height:700px}.category-dialog .el-dialog__header{display:none}.category-dialog .el-dialog__body{padding-bottom:0!important}.category-dialog .el-dialog__body .el-row{margin-bottom:24px}.category-dialog .el-dialog__body .el-row .icon-cp-close{cursor:pointer}.category-dialog .el-dialog__body .el-row .icon-cp-close:hover{color:#2f54eb}.category-dialog .el-dialog__footer{padding:20px 0}.el-tooltip__popper.category-dialog-tooltip{line-height:22px;padding:0 5px;font-size:12px;-webkit-transform:translateY(4px);transform:translateY(4px)}.el-tooltip__popper.category-dialog-tooltip .popper__arrow{display:none}.date-selector-box .damolish .el-form-item[data-v-4ba6d155]{margin-bottom:0}
\ No newline at end of file
.list-group[data-v-0929b113]{max-height:516px;padding-bottom:20px;overflow-y:auto}.list-group-item[data-v-0929b113]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-right:10px}.list-group-item+.list-group-item[data-v-0929b113]{margin-top:20px}.list-group-item .el-form-item[data-v-0929b113]{margin-bottom:0}.list-group-item .el-form-item .show-name[data-v-0929b113]{width:430px;height:32px;padding-left:11px;color:#303133;font-size:14px;line-height:32px;background:#f2f3f7;border-radius:2px;cursor:default}.list-group-item .icon-span[data-v-0929b113]{display:inline-block;width:24px;height:24px;line-height:24px;text-align:center;cursor:pointer}.list-group-item .icon-span[data-v-0929b113]:hover{background:#f2f3f7;border-radius:2px}.list-group-item .icon-span+.icon-span[data-v-0929b113]{margin-left:4px}.list-group-item .icon-span i.iconfont-components3[data-v-0929b113]{color:#303133}.list-group-item .handle.icon-cp-tuozhuaipaixu[data-v-0929b113]{margin-left:4px}.list-group-item .handle.icon-cp-tuozhuaipaixu[data-v-0929b113]:hover{cursor:move;color:#2f54eb}.category-dialog-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.category-dialog{margin:0!important;padding:0 4px 4px;max-height:700px}.category-dialog .el-dialog__header{display:none}.category-dialog .el-dialog__body{padding-bottom:0!important}.category-dialog .el-dialog__body .el-row{margin-bottom:24px}.category-dialog .el-dialog__body .el-row .icon-cp-close{cursor:pointer}.category-dialog .el-dialog__body .el-row .icon-cp-close:hover{color:#2f54eb}.category-dialog .el-dialog__footer{padding:20px 0}.el-tooltip__popper.category-dialog-tooltip{line-height:22px;padding:0 5px;font-size:12px;-webkit-transform:translateY(4px);transform:translateY(4px)}.el-tooltip__popper.category-dialog-tooltip .popper__arrow{display:none}.date-selector-box .damolish .el-form-item[data-v-4ba6d155]{margin-bottom:0}
\ No newline at end of file
.list-group[data-v-239e3f0c]{max-height:516px;padding-bottom:20px;overflow-y:auto}.list-group-item[data-v-239e3f0c]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-right:10px}.list-group-item+.list-group-item[data-v-239e3f0c]{margin-top:20px}.list-group-item .el-form-item[data-v-239e3f0c]{margin-bottom:0}.list-group-item .el-form-item .show-name[data-v-239e3f0c]{width:430px;height:32px;padding-left:11px;color:#303133;font-size:14px;line-height:32px;background:#f2f3f7;border-radius:2px;cursor:default}.list-group-item .icon-span[data-v-239e3f0c]{display:inline-block;width:24px;height:24px;line-height:24px;text-align:center;cursor:pointer}.list-group-item .icon-span[data-v-239e3f0c]:hover{background:#f2f3f7;border-radius:2px}.list-group-item .icon-span+.icon-span[data-v-239e3f0c]{margin-left:4px}.list-group-item .icon-span i.iconfont-components3[data-v-239e3f0c]{color:#303133}.list-group-item .handle.icon-cp-tuozhuaipaixu[data-v-239e3f0c]{margin-left:4px}.list-group-item .handle.icon-cp-tuozhuaipaixu[data-v-239e3f0c]:hover{cursor:move;color:#2f54eb}.category-dialog-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.category-dialog{margin:0!important;padding:0 4px 4px;max-height:700px}.category-dialog .el-dialog__header{display:none}.category-dialog .el-dialog__body{padding-bottom:0!important}.category-dialog .el-dialog__body .el-row{margin-bottom:24px}.category-dialog .el-dialog__body .el-row .icon-cp-close{cursor:pointer}.category-dialog .el-dialog__body .el-row .icon-cp-close:hover{color:#2f54eb}.category-dialog .el-dialog__footer{padding:20px 0}.el-tooltip__popper.category-dialog-tooltip{line-height:22px;padding:0 5px;font-size:12px;-webkit-transform:translateY(4px);transform:translateY(4px)}.el-tooltip__popper.category-dialog-tooltip .popper__arrow{display:none}
\ No newline at end of file
.list-group[data-v-0929b113]{max-height:516px;padding-bottom:20px;overflow-y:auto}.list-group-item[data-v-0929b113]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-right:10px}.list-group-item+.list-group-item[data-v-0929b113]{margin-top:20px}.list-group-item .el-form-item[data-v-0929b113]{margin-bottom:0}.list-group-item .el-form-item .show-name[data-v-0929b113]{width:430px;height:32px;padding-left:11px;color:#303133;font-size:14px;line-height:32px;background:#f2f3f7;border-radius:2px;cursor:default}.list-group-item .icon-span[data-v-0929b113]{display:inline-block;width:24px;height:24px;line-height:24px;text-align:center;cursor:pointer}.list-group-item .icon-span[data-v-0929b113]:hover{background:#f2f3f7;border-radius:2px}.list-group-item .icon-span+.icon-span[data-v-0929b113]{margin-left:4px}.list-group-item .icon-span i.iconfont-components3[data-v-0929b113]{color:#303133}.list-group-item .handle.icon-cp-tuozhuaipaixu[data-v-0929b113]{margin-left:4px}.list-group-item .handle.icon-cp-tuozhuaipaixu[data-v-0929b113]:hover{cursor:move;color:#2f54eb}.category-dialog-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.category-dialog{margin:0!important;padding:0 4px 4px;max-height:700px}.category-dialog .el-dialog__header{display:none}.category-dialog .el-dialog__body{padding-bottom:0!important}.category-dialog .el-dialog__body .el-row{margin-bottom:24px}.category-dialog .el-dialog__body .el-row .icon-cp-close{cursor:pointer}.category-dialog .el-dialog__body .el-row .icon-cp-close:hover{color:#2f54eb}.category-dialog .el-dialog__footer{padding:20px 0}.el-tooltip__popper.category-dialog-tooltip{line-height:22px;padding:0 5px;font-size:12px;-webkit-transform:translateY(4px);transform:translateY(4px)}.el-tooltip__popper.category-dialog-tooltip .popper__arrow{display:none}
\ No newline at end of file
<!DOCTYPE html><html lang=cn><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/gic-marketing-operation/favicon2.ico><link rel=stylesheet type=text/css href=//web-1251519181.file.myqcloud.com/custom-element/custom-element.1.0.68.css><link rel=stylesheet href=//at.alicdn.com/t/font_2995156_rf810o69kh.css><link rel=stylesheet href=//at.alicdn.com/t/font_2859043_3i96mi4mdy2.css><title>实施运维</title><link href=/gic-marketing-operation/css/chunk-0f261c02.04f99a59.css rel=prefetch><link href=/gic-marketing-operation/css/chunk-24c062c7.00379462.css rel=prefetch><link href=/gic-marketing-operation/css/chunk-31d68610.1b98bb09.css rel=prefetch><link href=/gic-marketing-operation/css/chunk-3951845a.c72ebab2.css rel=prefetch><link href=/gic-marketing-operation/css/chunk-3c8e61f9.91919a21.css rel=prefetch><link href=/gic-marketing-operation/css/chunk-487ffbe9.5237f6e4.css rel=prefetch><link href=/gic-marketing-operation/css/chunk-4ab6a8e6.3039eb8b.css rel=prefetch><link href=/gic-marketing-operation/css/chunk-611f499e.1f8770b4.css rel=prefetch><link href=/gic-marketing-operation/css/chunk-63502675.ca3245d5.css rel=prefetch><link href=/gic-marketing-operation/css/chunk-696ad248.836e070a.css rel=prefetch><link href=/gic-marketing-operation/css/chunk-74ea1fe8.62fd728d.css rel=prefetch><link href=/gic-marketing-operation/css/chunk-7be75042.15adffd0.css rel=prefetch><link href=/gic-marketing-operation/js/chunk-04a36950.689398e4.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-0f261c02.ec5c078c.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-24c062c7.35d5a017.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-2d210fe9.de06466d.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-31d68610.36e052ea.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-3951845a.9c61c287.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-3c8e61f9.cc23d89a.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-3ed1e28a.a39903b2.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-487ffbe9.d96b5311.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-4a5f46a6.8f8eeae7.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-4ab6a8e6.8eb219e2.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-5186a57c.431e08c6.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-611f499e.3aa17e26.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-63502675.e8967f75.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-696ad248.6ac169ba.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-74ea1fe8.14dd6a2a.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-7be75042.1a6996d3.js rel=prefetch><link href=/gic-marketing-operation/css/app.d9ec5df4.css rel=preload as=style><link href=/gic-marketing-operation/js/app.3455047c.js rel=preload as=script><link href=/gic-marketing-operation/js/chunk-vendors.1dd27d91.js rel=preload as=script><link href=/gic-marketing-operation/css/app.d9ec5df4.css rel=stylesheet></head><body class=damolish><noscript><strong>We're sorry but damolish doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script>(function() {
<!DOCTYPE html><html lang=cn><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/gic-marketing-operation/favicon2.ico><link rel=stylesheet type=text/css href=//web-1251519181.file.myqcloud.com/custom-element/custom-element.1.0.68.css><link rel=stylesheet href=//at.alicdn.com/t/font_2995156_rf810o69kh.css><link rel=stylesheet href=//at.alicdn.com/t/font_2859043_3i96mi4mdy2.css><title>实施运维</title><link href=/gic-marketing-operation/css/chunk-0f261c02.04f99a59.css rel=prefetch><link href=/gic-marketing-operation/css/chunk-198021d2.38be5b93.css rel=prefetch><link href=/gic-marketing-operation/css/chunk-24c062c7.00379462.css rel=prefetch><link href=/gic-marketing-operation/css/chunk-3951845a.c72ebab2.css rel=prefetch><link href=/gic-marketing-operation/css/chunk-3c8e61f9.91919a21.css rel=prefetch><link href=/gic-marketing-operation/css/chunk-4ab6a8e6.3039eb8b.css rel=prefetch><link href=/gic-marketing-operation/css/chunk-5b047e0b.e57b3df5.css rel=prefetch><link href=/gic-marketing-operation/css/chunk-611f499e.1f8770b4.css rel=prefetch><link href=/gic-marketing-operation/css/chunk-63502675.ca3245d5.css rel=prefetch><link href=/gic-marketing-operation/css/chunk-696ad248.836e070a.css rel=prefetch><link href=/gic-marketing-operation/css/chunk-74ea1fe8.62fd728d.css rel=prefetch><link href=/gic-marketing-operation/css/chunk-7be75042.15adffd0.css rel=prefetch><link href=/gic-marketing-operation/js/chunk-04a36950.689398e4.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-0f261c02.ec5c078c.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-198021d2.713d08d0.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-24c062c7.35d5a017.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-2d210fe9.de06466d.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-3951845a.9c61c287.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-3c8e61f9.cc23d89a.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-3ed1e28a.a39903b2.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-4a5f46a6.8f8eeae7.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-4ab6a8e6.8eb219e2.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-5186a57c.431e08c6.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-5b047e0b.4fadad1e.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-611f499e.3aa17e26.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-63502675.e8967f75.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-696ad248.6ac169ba.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-74ea1fe8.14dd6a2a.js rel=prefetch><link href=/gic-marketing-operation/js/chunk-7be75042.1a6996d3.js rel=prefetch><link href=/gic-marketing-operation/css/app.d9ec5df4.css rel=preload as=style><link href=/gic-marketing-operation/js/app.e7536191.js rel=preload as=script><link href=/gic-marketing-operation/js/chunk-vendors.1dd27d91.js rel=preload as=script><link href=/gic-marketing-operation/css/app.d9ec5df4.css rel=stylesheet></head><body class=damolish><noscript><strong>We're sorry but damolish doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script>(function() {
var src = '/component/static/import-component.js?timestrap=' + new Date().getTime();
var host = window.location.host;
host = host.indexOf('localhost') > -1 || host.indexOf('192.168') > -1 ? 'gicdev.demogic.com' : host;
document.write('<script src="//' + host + src + '"><\/script>');
})();</script><script src=//web-1251519181.file.myqcloud.com/components/user-info.1.0.3.js></script><script src=//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js></script><script src=/gic-marketing-operation/js/chunk-vendors.1dd27d91.js></script><script src=/gic-marketing-operation/js/app.3455047c.js></script></body></html>
\ No newline at end of file
})();</script><script src=//web-1251519181.file.myqcloud.com/components/user-info.1.0.3.js></script><script src=//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js></script><script src=/gic-marketing-operation/js/chunk-vendors.1dd27d91.js></script><script src=/gic-marketing-operation/js/app.e7536191.js></script></body></html>
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-487ffbe9"],{"0f7d":function(t,e,i){"use strict";i("6bb1")},"561b":function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{staticClass:"category-dialog-wrap",attrs:{"custom-class":"category-dialog",visible:t.dialogVisible,rules:t.rules,width:"600px","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.dialogVisible=e}}},[i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[i("el-row",{attrs:{type:"flex",justify:"space-between"}},[i("h1",{staticClass:"el-dialog__title"},[t._v("分类管理")]),i("i",{staticClass:"iconfont-components3 icon-cp-close",on:{click:t.handleClose}})]),i("el-form",{ref:"form",attrs:{model:t.list}},[i("draggable",{staticClass:"list-group",attrs:{tag:"ul",list:t.list,handle:".handle"}},t._l(t.list,(function(e,a){return i("li",{key:a,staticClass:"list-group-item"},[i("el-form-item",{attrs:{prop:a+".categoryName",rules:t.rules.categoryName}},[i("el-input",{staticStyle:{width:"466px"},model:{value:t.list[a].categoryName,callback:function(e){t.$set(t.list[a],"categoryName",e)},expression:"list[idx].categoryName"}})],1),t.list.length>1?i("div",{staticClass:"btn-wrap"},[i("span",{staticClass:"icon-span",on:{click:function(e){return t.onDeleteItem(a)}}},[i("i",{staticClass:"iconfont-components3 icon-cp-DeleteOutlined"})]),i("el-tooltip",{attrs:{"popper-class":"category-dialog-tooltip",effect:"dark",content:"拖拽排序",placement:"top"}},[i("i",{staticClass:"iconfont-components3 icon-cp-tuozhuaipaixu handle"})])],1):i("div",{staticClass:"btn-wrap"})],1)})),0)],1),i("el-button",{staticStyle:{"margin-top":"12px"},attrs:{type:"text"},on:{click:t.addItem}},[i("i",{staticClass:"iconfont-components3 icon-cp-PlusOutlined"}),t._v(" 添加分类")]),i("el-row",{staticStyle:{"margin-top":"24px"},attrs:{type:"flex",justify:"end"}},[i("el-button",{on:{click:t.handleClose}},[t._v("取 消")]),i("el-button",{attrs:{type:"primary"},on:{click:t.submit}},[t._v("确 定")])],1)],1)])},n=[],r=(i("8e6e"),i("ac6a"),i("456d"),i("bd86")),s=(i("96cf"),i("3b8d")),o=i("c356"),c=i("b76a"),l=i.n(c);function u(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function p(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?u(Object(i),!0).forEach((function(e){Object(r["a"])(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):u(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var f=o["a"].saveHolidayCategory,d=o["a"].getHolidayCategoryList,g={name:"CategoryDialog",components:{draggable:l.a},props:{visible:{type:Boolean,default:!1}},data:function(){var t=this,e=function(e,i,a){i||a(new Error("请填写分类名称")),t.nameMap[i]===t.list.indexOf((function(t){return t.categoryName===i}))&&a(new Error("".concat(i,"分类名称重复"))),a()};return{dialogVisible:!1,loading:!1,list:[],nameMap:{},defaultItem:{activityCategoryId:"",categoryName:"",isEdit:!0},rules:{categoryName:[{required:!0,validator:e}]},copyItem:{}}},methods:{handleClose:function(){var t=this;this.$nextTick((function(e){t.list=[],t.$emit("update:visible",!1)}))},getCategoryList:function(){var t=Object(s["a"])(regeneratorRuntime.mark((function t(){var e,i,a,n,r=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.loading=!0,t.next=3,d().finally((function(t){return r.loading=!1}));case 3:e=t.sent,i=e.result,a=void 0===i?[]:i,n={},a=a.map((function(t,e){return t.isEdit=!1,n[t.categoryName]=e,t})),this.nameMap=n,this.list=JSON.parse(JSON.stringify(a));case 10:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),submit:function(){var t=this;this.loading=!0,this.$refs.form.validate((function(e){if(e){var i=[];i=t.list.map((function(t,e){return t={categorySort:e,categoryName:t.categoryName,activityCategoryId:t.activityCategoryId||""},t})),f(i).then((function(e){t.$message.success("提交成功"),t.handleClose(),t.$emit("refresh"),t.loading=!1})).catch((function(){t.loading=!1}))}else t.loading=!1}))},onDeleteItem:function(){var t=Object(s["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(1!=this.list.length){t.next=2;break}return t.abrupt("return");case 2:if(!this.list[e].hasUse){t.next=4;break}return t.abrupt("return",this.$message.error("该分类有活动在引用,不可删除!"));case 4:this.list.splice(e,1),delete this.nameMap[this.list[e].categoryName];case 6:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),addItem:function(){this.copyItem={},this.list.push(p({},this.defaultItem))}},watch:{visible:{handler:function(t,e){this.dialogVisible=t,t&&this.getCategoryList()},immediate:!0}}},m=g,y=(i("ff3a"),i("0f7d"),i("2877")),h=Object(y["a"])(m,a,n,!1,null,"239e3f0c",null);e["default"]=h.exports},"6bb1":function(t,e,i){},fde6:function(t,e,i){},ff3a:function(t,e,i){"use strict";i("fde6")}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5b047e0b"],{"019c":function(t,e,i){},"0f7d":function(t,e,i){"use strict";i("6bb1")},"561b":function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{staticClass:"category-dialog-wrap",attrs:{"custom-class":"category-dialog",visible:t.dialogVisible,rules:t.rules,width:"600px","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.dialogVisible=e}}},[i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[i("el-row",{attrs:{type:"flex",justify:"space-between"}},[i("h1",{staticClass:"el-dialog__title"},[t._v("分类管理")]),i("i",{staticClass:"iconfont-components3 icon-cp-close",on:{click:t.handleClose}})]),i("el-form",{ref:"form",attrs:{model:t.list}},[i("draggable",{staticClass:"list-group",attrs:{tag:"ul",list:t.list,handle:".handle"}},t._l(t.list,(function(e,a){return i("li",{key:a,staticClass:"list-group-item"},[i("el-form-item",{attrs:{prop:a+".categoryName",rules:t.rules.categoryName}},[i("el-input",{staticStyle:{width:"466px"},attrs:{maxlength:"8"},model:{value:t.list[a].categoryName,callback:function(e){t.$set(t.list[a],"categoryName",e)},expression:"list[idx].categoryName"}})],1),t.list.length>1?i("div",{staticClass:"btn-wrap"},[i("span",{staticClass:"icon-span",on:{click:function(e){return t.onDeleteItem(a)}}},[i("i",{staticClass:"iconfont-components3 icon-cp-DeleteOutlined"})]),i("el-tooltip",{attrs:{"popper-class":"category-dialog-tooltip",effect:"dark",content:"拖拽排序",placement:"top"}},[i("i",{staticClass:"iconfont-components3 icon-cp-tuozhuaipaixu handle"})])],1):i("div",{staticClass:"btn-wrap"})],1)})),0)],1),i("el-button",{staticStyle:{"margin-top":"12px"},attrs:{type:"text"},on:{click:t.addItem}},[i("i",{staticClass:"iconfont-components3 icon-cp-PlusOutlined"}),t._v(" 添加分类")]),i("el-row",{staticStyle:{"margin-top":"24px"},attrs:{type:"flex",justify:"end"}},[i("el-button",{on:{click:t.handleClose}},[t._v("取 消")]),i("el-button",{attrs:{type:"primary"},on:{click:t.submit}},[t._v("确 定")])],1)],1)])},n=[],r=(i("8e6e"),i("ac6a"),i("456d"),i("bd86")),s=(i("96cf"),i("3b8d")),o=i("c356"),c=i("b76a"),l=i.n(c);function u(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function p(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?u(Object(i),!0).forEach((function(e){Object(r["a"])(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):u(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var d=o["a"].saveHolidayCategory,f=o["a"].getHolidayCategoryList,g={name:"CategoryDialog",components:{draggable:l.a},props:{visible:{type:Boolean,default:!1}},data:function(){var t=this,e=function(e,i,a){i||a(new Error("请填写分类名称")),t.nameMap[i]===t.list.indexOf((function(t){return t.categoryName===i}))&&a(new Error("".concat(i,"分类名称重复"))),a()};return{dialogVisible:!1,loading:!1,list:[],nameMap:{},defaultItem:{activityCategoryId:"",categoryName:"",isEdit:!0},rules:{categoryName:[{required:!0,validator:e}]},copyItem:{}}},methods:{handleClose:function(){var t=this;this.$nextTick((function(e){t.list=[],t.$emit("update:visible",!1)}))},getCategoryList:function(){var t=Object(s["a"])(regeneratorRuntime.mark((function t(){var e,i,a,n,r=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.loading=!0,t.next=3,f().finally((function(t){return r.loading=!1}));case 3:e=t.sent,i=e.result,a=void 0===i?[]:i,n={},a=a.map((function(t,e){return t.isEdit=!1,n[t.categoryName]=e,t})),this.nameMap=n,this.list=JSON.parse(JSON.stringify(a));case 10:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),submit:function(){var t=this;this.loading=!0,this.$refs.form.validate((function(e){if(e){var i=[];i=t.list.map((function(t,e){return t={categorySort:e,categoryName:t.categoryName,activityCategoryId:t.activityCategoryId||""},t})),d(i).then((function(e){t.$message.success("提交成功"),t.handleClose(),t.$emit("refresh"),t.loading=!1})).catch((function(){t.loading=!1}))}else t.loading=!1}))},onDeleteItem:function(){var t=Object(s["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(1!=this.list.length){t.next=2;break}return t.abrupt("return");case 2:if(!this.list[e].hasUse){t.next=4;break}return t.abrupt("return",this.$message.error("该分类有活动在引用,不可删除!"));case 4:this.list.splice(e,1),delete this.nameMap[this.list[e].categoryName];case 6:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),addItem:function(){this.copyItem={},this.list.push(p({},this.defaultItem))}},watch:{visible:{handler:function(t,e){this.dialogVisible=t,t&&this.getCategoryList()},immediate:!0}}},m=g,h=(i("cb2c"),i("0f7d"),i("2877")),y=Object(h["a"])(m,a,n,!1,null,"0929b113",null);e["default"]=y.exports},"6bb1":function(t,e,i){},cb2c:function(t,e,i){"use strict";i("019c")}}]);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment