1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0a100d48"],{"6ea4":function(t,e,a){"use strict";a("723c")},"723c":function(t,e,a){},c621:function(t,e,a){"use strict";a.d(e,"j",(function(){return r})),a.d(e,"b",(function(){return o})),a.d(e,"m",(function(){return u})),a.d(e,"f",(function(){return i})),a.d(e,"d",(function(){return l})),a.d(e,"h",(function(){return c})),a.d(e,"i",(function(){return d})),a.d(e,"g",(function(){return s})),a.d(e,"c",(function(){return m})),a.d(e,"a",(function(){return f})),a.d(e,"l",(function(){return p})),a.d(e,"e",(function(){return h})),a.d(e,"k",(function(){return b}));var n=a("b775");function r(t){return Object(n["a"])({url:"/template/category/search",method:"post",data:t})}function o(t){return Object(n["a"])({url:"/template/category/create",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/template/category/update",method:"post",data:t})}function i(t){return Object(n["a"])({url:"/template/category/info",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/template/category/delete",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/template/pageTemplate",method:"post",data:t})}function d(t){return Object(n["a"])({url:"/template/search",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/template/info",method:"post",data:t})}function m(t){return Object(n["a"])({url:"/template/delete",method:"post",data:t})}function f(t){return Object(n["a"])({url:"/template/create",method:"post",data:t})}function p(t){return Object(n["a"])({url:"/template/update",method:"post",data:t})}function h(t){return Object(n["a"])({url:"/template/category/allList",method:"post",data:t})}function b(t){return Object(n["a"])({url:"/template/category/treeCategory",method:"post",data:t})}},d3dd:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"data-info"},[a("el-card",[a("el-form",{ref:"dataFormRef",attrs:{model:t.dataForm,"label-width":"120px"}},[a("el-form-item",{attrs:{label:"父级分类:"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择你级分类",size:"large",clearable:""},model:{value:t.dataForm.parent_id,callback:function(e){t.$set(t.dataForm,"parent_id",e)},expression:"dataForm.parent_id"}},t._l(t.parentList,(function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),a("el-form-item",{attrs:{label:"分类名称:"}},[a("el-input",{model:{value:t.dataForm.name,callback:function(e){t.$set(t.dataForm,"name",e)},expression:"dataForm.name"}})],1),a("el-form-item",{attrs:{label:"分类状态:"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择分类状态",size:"large"},model:{value:t.dataForm.status,callback:function(e){t.$set(t.dataForm,"status",e)},expression:"dataForm.status"}},t._l(t.statusOptions,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1)],1)],1),a("div",{staticStyle:{"text-align":"right","margin-top":"20px"}},[a("el-button",{attrs:{type:"warning"},on:{click:t.btnSave}},[t._v("确认保存")])],1)],1)},r=[],o=(a("14d9"),a("a9e3"),a("c621")),u={emits:["onClose","onSearch"],props:{id:{type:Number,default:0}},watch:{id:{handler:function(t){var e=this;null==t||t<=0||e.getInfo(t)},immediate:!0,deep:!0}},data:function(){return{activeName:"base",currentCategory:[],dataForm:{id:0,name:"",parent_id:0,intro:"",status:5},parentList:[],statusOptions:[{value:"",label:"请选择状态"},{value:5,label:"启用"},{value:6,label:"停用"}]}},mounted:function(){this.initParentCategory()},methods:{resetForm:function(){this.dataForm={},this.$refs.dataFormRef.resetFields()},initParentCategory:function(){var t=this;Object(o["j"])({page:1,pageSize:999,parent_id:0,status:5}).then((function(e){200==e.status&&t.parentList.push({id:0,name:"父级分类"})}))},btnSave:function(t){var e=this;e.dataForm.id>0?Object(o["m"])(e.dataForm).then((function(t){200==t.status&&(e.$alert("模板类别信息更新成功"),e.$emit("onSearch"),e.$emit("onClose"))})):Object(o["b"])(e.dataForm).then((function(t){200==t.status&&(e.$alert("模板类别信息创建成功"),e.$emit("onSearch"),e.$emit("onClose"))}))},getInfo:function(t){var e=this,a={id:t};Object(o["f"])(a).then((function(t){t&&200==t.status&&(t.data.parent_id=Number(t.data.parent_id),e.dataForm=t.data)}))},onChangeStatus:function(t){this.dataForm.status=t},onChangeCategory:function(t){var e=this;e.dataForm.categoryId=t}}},i=u,l=(a("6ea4"),a("2877")),c=Object(l["a"])(i,n,r,!1,null,null,null);e["default"]=c.exports}}]);
|