UNPKG

beehole-store-server

Version:

www.bee-hole.com

1 lines 3.33 kB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-15c027b2"],{"083c":function(t,e,r){"use strict";r.r(e);r("4e82");var n=r("2dd7"),o=r("19c5");e["default"]={name:"CreateForm",props:{showTitleOptions:{type:Array,required:!0},isAllowDragOptions:{type:Array,required:!0},statusOptions:{type:Array,required:!0}},components:{AntModal:n["a"]},data:function(){var t=this,e=function(e,r,n){""===r||void 0===r||null===r?n(new Error("小页编码不允许为空")):(Object(o["b"])(t.form.id,t.form.code),n())};return{open:!1,spinning:!1,delayTime:100,labelCol:{span:4},wrapperCol:{span:14},loading:!1,total:0,id:void 0,formTitle:"添加工作台小页管理",form:{},rules:{name:[{required:!0,message:"小页名称不能为空",trigger:"blur"}],code:[{required:!0,message:"小页编码不能为空",validator:e,trigger:"blur"}],status:[{required:!0,message:"状态不能为空",trigger:"blur"}]}}},filters:{},created:function(){},computed:{},watch:{},mounted:function(){},methods:{onClose:function(){this.open=!1,this.reset(),this.$emit("close")},cancel:function(){this.open=!1,this.reset(),this.$emit("close")},reset:function(){this.form={id:void 0,name:void 0,code:void 0,url:void 0,refreshRate:void 0,showTitle:"N",isAllowDrag:"N",xGridNumber:"2",yGridNumber:100,sort:void 0,status:"0"}},handleAdd:function(){var t=this;this.reset(),Object(o["e"])().then((function(e){t.form.sort=e.data,t.open=!0,t.formTitle="添加工作台小页管理"}))},handleUpdate:function(t){var e=this;this.reset(),this.open=!0,this.spinning=!this.spinning;var r=t.id;Object(o["f"])(r).then((function(t){e.form=t.data,e.formTitle="修改工作台小页管理",e.spinning=!e.spinning}))},submitForm:function(){var t=this;this.$refs.form.validate((function(e){if(!e)return!1;var r=JSON.parse(JSON.stringify(t.form));void 0!==t.form.id?Object(o["i"])(r).then((function(e){t.$message.success("新增成功",3),t.open=!1,t.$emit("ok"),t.$emit("close")})):Object(o["a"])(r).then((function(e){t.$message.success("新增成功",3),t.open=!1,t.$emit("ok"),t.$emit("close")}))}))},back:function(){var t="/system/sysportlet/index";this.$router.push(t)}}}},"19c5":function(t,e,r){"use strict";r.d(e,"g",(function(){return o})),r.d(e,"f",(function(){return s})),r.d(e,"a",(function(){return i})),r.d(e,"i",(function(){return u})),r.d(e,"c",(function(){return c})),r.d(e,"e",(function(){return d})),r.d(e,"b",(function(){return a})),r.d(e,"d",(function(){return l})),r.d(e,"h",(function(){return m}));var n=r("b775");function o(t){return Object(n["b"])({url:"/system/sysPortlet/list",method:"get",params:t})}function s(t){return Object(n["b"])({url:"/system/sysPortlet/"+t,method:"get"})}function i(t){return Object(n["b"])({url:"/system/sysPortlet",method:"post",data:t})}function u(t){return Object(n["b"])({url:"/system/sysPortlet",method:"put",data:t})}function c(t){return Object(n["b"])({url:"/system/sysPortlet/"+t,method:"delete"})}function d(){return Object(n["b"])({url:"/system/sysPortlet/findMaxSort",method:"get"})}function a(t,e){return void 0===t&&(t=""),Object(n["b"])({url:"/system/sysPortlet/checkCodeUnique/"+e+"/"+t,method:"get"})}function l(t){return Object(n["b"])({url:"/system/sysPortlet/export",method:"get",params:t})}function m(t){return Object(n["b"])({url:"/system/sysPortlet/getSysPortletByRoleId",method:"get",params:t})}}}]);