chunk-016c938c.dbc69331.js 7.9 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-016c938c","chunk-0a100d48"],{"1e00":function(t,e,a){},6938: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-search"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:t.queryForm}},[a("el-form-item",{attrs:{label:"分类名称:"}},[a("el-input",{attrs:{placeholder:"请选择分类名称"},model:{value:t.queryForm.name,callback:function(e){t.$set(t.queryForm,"name",e)},expression:"queryForm.name"}})],1),a("el-form-item",{attrs:{label:"分类状态:"}},[a("el-select",{staticClass:"m-2",attrs:{placeholder:"请选择分类状态",size:"large"},model:{value:t.queryForm.status,callback:function(e){t.$set(t.queryForm,"status",e)},expression:"queryForm.status"}},t._l(t.statusOptions,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:t.onSubmit}},[a("svg-icon",{attrs:{"icon-class":"search"}}),t._v(" 搜索")],1),a("el-button",{attrs:{type:"success"},on:{click:t.onCreate}},[a("svg-icon",{attrs:{"icon-class":"edit"}}),t._v(" 创建分类")],1)],1)],1),a("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{visible:t.dialogVisible,"append-to-body":"",width:"50%","custom-class":"prod-verify",title:"创建分类"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("dataInfo",{on:{onClose:t.onClose}})],1)],1)},o=[],r=a("d3dd"),i=a("a888"),l={components:{dataInfo:r["default"]},directives:{elDragDialog:i["a"]},props:{queryForm:{type:Object,default:function(){return{page:1,pageSize:10,name:"",parent_id:0,status:""}}}},data:function(){return{statusOptions:[{value:"",label:"请选择状态"},{value:5,label:"启用"},{value:6,label:"停用"}],dialogVisible:!1}},created:function(){},methods:{onCreate:function(t){this.dialogVisible=!0},onClose:function(t){this.dialogVisible=!1,this.onSubmit()},onSubmit:function(){this.queryForm.isUpdate=!this.queryForm.isUpdate,this.$emit("bindSetQuery",this.queryForm)}}},u=l,c=(a("8a25"),a("2877")),s=Object(c["a"])(u,n,o,!1,null,null,null);e["default"]=s.exports},"6ea4":function(t,e,a){"use strict";a("723c")},"723c":function(t,e,a){},"8a25":function(t,e,a){"use strict";a("1e00")},a888:function(t,e,a){"use strict";a("99af"),a("caad"),a("ac1f"),a("2532"),a("5319");var n={bind:function(t,e,a){var n=t.querySelector(".el-dialog__header"),o=t.querySelector(".el-dialog");n.style.cssText+=";cursor:move;",o.style.cssText+=";top:0px;";var r=function(){return window.document.currentStyle?function(t,e){return t.currentStyle[e]}:function(t,e){return getComputedStyle(t,!1)[e]}}();n.onmousedown=function(t){var e=t.clientX-n.offsetLeft,i=t.clientY-n.offsetTop,l=o.offsetWidth,u=o.offsetHeight,c=document.body.clientWidth,s=document.body.clientHeight,d=o.offsetLeft,m=c-o.offsetLeft-l,f=o.offsetTop,p=s-o.offsetTop-u,b=r(o,"left"),h=r(o,"top");b.includes("%")?(b=+document.body.clientWidth*(+b.replace(/\%/g,"")/100),h=+document.body.clientHeight*(+h.replace(/\%/g,"")/100)):(b=+b.replace(/\px/g,""),h=+h.replace(/\px/g,"")),document.onmousemove=function(t){var n=t.clientX-e,r=t.clientY-i;-n>d?n=-d:n>m&&(n=m),-r>f?r=-f:r>p&&(r=p),o.style.cssText+=";left:".concat(n+b,"px;top:").concat(r+h,"px;"),a.child.$emit("dragDialog")},document.onmouseup=function(t){document.onmousemove=null,document.onmouseup=null}}}},o=function(t){t.directive("el-drag-dialog",n)};window.Vue&&(window["el-drag-dialog"]=n,Vue.use(o)),n.install=o;e["a"]=n},c621:function(t,e,a){"use strict";a.d(e,"j",(function(){return o})),a.d(e,"b",(function(){return r})),a.d(e,"m",(function(){return i})),a.d(e,"f",(function(){return l})),a.d(e,"d",(function(){return u})),a.d(e,"h",(function(){return c})),a.d(e,"i",(function(){return s})),a.d(e,"g",(function(){return d})),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 b})),a.d(e,"k",(function(){return h}));var n=a("b775");function o(t){return Object(n["a"])({url:"/template/category/search",method:"post",data:t})}function r(t){return Object(n["a"])({url:"/template/category/create",method:"post",data:t})}function i(t){return Object(n["a"])({url:"/template/category/update",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/template/category/info",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/template/category/delete",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/document/block/list",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/template/search",method:"post",data:t})}function d(t){return Object(n["a"])({url:"/template/info",method:"post",data:t})}function m(t){return Object(n["a"])({url:"/document/block/dele/".concat(t),method:"get"})}function f(t){return Object(n["a"])({url:"/document/block/add",method:"post",data:t})}function p(t){return Object(n["a"])({url:"/document/block/edit",method:"post",data:t})}function b(t){return Object(n["a"])({url:"/template/category/allList",method:"post",data:t})}function h(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)},o=[],r=(a("14d9"),a("a9e3"),a("c621")),i={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(r["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(r["m"])(e.dataForm).then((function(t){200==t.status&&(e.$alert("模板类别信息更新成功"),e.$emit("onSearch"),e.$emit("onClose"))})):Object(r["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(r["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}}},l=i,u=(a("6ea4"),a("2877")),c=Object(u["a"])(l,n,o,!1,null,null,null);e["default"]=c.exports}}]);