(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6a2a74ef"],{"0311":function(t,e,a){"use strict";a("57c2")},"24d2":function(t,e,a){"use strict";a.d(e,"g",(function(){return r})),a.d(e,"a",(function(){return o})),a.d(e,"i",(function(){return c})),a.d(e,"e",(function(){return i})),a.d(e,"c",(function(){return u})),a.d(e,"h",(function(){return l})),a.d(e,"b",(function(){return s})),a.d(e,"j",(function(){return d})),a.d(e,"f",(function(){return m})),a.d(e,"d",(function(){return f}));var n=a("b775");function r(t){return Object(n["a"])({url:"/project/category/search",method:"post",data:t})}function o(t){return Object(n["a"])({url:"/project/category/create",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/project/category/update",method:"post",data:t})}function i(t){return Object(n["a"])({url:"/project/category/info",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/project/category/delete",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/project/search",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/project/create",method:"post",data:t})}function d(t){return Object(n["a"])({url:"/project/update",method:"post",data:t})}function m(t){return Object(n["a"])({url:"/project/info",method:"post",data:t})}function f(t){return Object(n["a"])({url:"/project/delete",method:"post",data:t})}},"27ba":function(t,e,a){"use strict";a("4245")},4245:function(t,e,a){},"57c2":function(t,e,a){},5930:function(t,e,a){"use strict";a("a782")},"5c41":function(t,e,a){"use strict";a("b1bc")},a782:function(t,e,a){},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"),r=t.querySelector(".el-dialog");n.style.cssText+=";cursor:move;",r.style.cssText+=";top:0px;";var o=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,c=t.clientY-n.offsetTop,i=r.offsetWidth,u=r.offsetHeight,l=document.body.clientWidth,s=document.body.clientHeight,d=r.offsetLeft,m=l-r.offsetLeft-i,f=r.offsetTop,p=s-r.offsetTop-u,h=o(r,"left"),b=o(r,"top");h.includes("%")?(h=+document.body.clientWidth*(+h.replace(/\%/g,"")/100),b=+document.body.clientHeight*(+b.replace(/\%/g,"")/100)):(h=+h.replace(/\px/g,""),b=+b.replace(/\px/g,"")),document.onmousemove=function(t){var n=t.clientX-e,o=t.clientY-c;-n>d?n=-d:n>m&&(n=m),-o>f?o=-f:o>p&&(o=p),r.style.cssText+=";left:".concat(n+h,"px;top:").concat(o+b,"px;"),a.child.$emit("dragDialog")},document.onmouseup=function(t){document.onmousemove=null,document.onmouseup=null}}}},r=function(t){t.directive("el-drag-dialog",n)};window.Vue&&(window["el-drag-dialog"]=n,Vue.use(r)),n.install=r;e["a"]=n},ac24: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:"project-search"},[a("dataSearch",{on:{bindSetQuery:t.setQuery}}),a("dataList",{attrs:{queryForm:t.queryForm}})],1)},r=[],o=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:{clearable:"",placeholder:"请选择分类",size:"large"},model:{value:t.queryForm.category_id,callback:function(e){t.$set(t.queryForm,"category_id",e)},expression:"queryForm.category_id"}},t._l(t.categoryList,(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-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)],1)},c=[],i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"data-info"},[a("el-card",[a("el-form",{attrs:{model:t.dataForm,"label-width":"120px"}},[a("el-form-item",{attrs:{label:"组件类型:"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择类型",size:"large"},on:{change:t.onChangeStatus},model:{value:t.dataForm.type,callback:function(e){t.$set(t.dataForm,"type",e)},expression:"dataForm.type"}},t._l(t.typeList,(function(t){return a("el-option",{key:t.value,attrs:{label:t.text,value:t.value}})})),1)],1),a("el-form-item",{attrs:{label:"组件名称:"}},[a("el-input",{model:{value:t.dataForm.title,callback:function(e){t.$set(t.dataForm,"title",e)},expression:"dataForm.title"}})],1),a("el-form-item",{attrs:{label:"产品状态:"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择状态",size:"large"},on:{change:t.onChangeStatus},model:{value:t.dataForm.statusName,callback:function(e){t.$set(t.dataForm,"statusName",e)},expression:"dataForm.statusName"}},t._l(t.statusOptions,(function(t){return a("el-option",{key:t.status,attrs:{label:t.name,value:t.status}})})),1)],1),a("el-form-item",{attrs:{label:"说明介绍:"}},[a("el-input",{attrs:{type:"textarea"},model:{value:t.dataForm.title,callback:function(e){t.$set(t.dataForm,"title",e)},expression:"dataForm.title"}})],1),1==t.dataForm.type?a("el-form-item",{attrs:{label:"组件内容:"}},[a("Tinymce")],1):t._e()],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)},u=[],l=(a("a9e3"),a("8256")),s=(a("24d2"),{components:{Tinymce:l["default"]},emits:["onClose"],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:[],allCategories:[],typeList:[{value:1,text:"文本"},{value:2,text:"二维表"}],dataForm:{type:1,prod:{items:[]}},statusOptions:[{status:5,name:"启用"},{status:6,name:"停用"}]}},mounted:function(){var t=this;t.initAllCategory()},methods:{btnSave:function(t){var e=this;if(""!=e.dataForm.title)e.dataForm.id,e.dataForm.title,e.dataForm.status,e.dataForm.categoryId,e.dataForm.sku;else e.$alert("产品标题不能为空")},getInfo:function(t){},onChangeStatus:function(t){this.dataForm.status=t},onChangeCategory:function(t){var e=this;e.dataForm.categoryId=t},initAllCategory:function(){}}}),d=s,m=(a("0311"),a("2877")),f=Object(m["a"])(d,i,u,!1,null,null,null),p=f.exports,h=a("a888"),b=a("c621"),g={components:{dataInfo:p},directives:{elDragDialog:h["a"]},props:{queryForm:{type:Object,default:function(){return{page:1,pageSize:10,name:"",category_id:"",status:""}}}},data:function(){return{statusOptions:[{value:"",label:"请选择状态"},{value:5,label:"启用"},{value:6,label:"停用"}],categoryList:[],dialogVisible:!1}},mounted:function(){this.initCategory()},methods:{initCategory:function(){var t=this;Object(b["j"])({page:1,pageSize:999,status:5}).then((function(e){200==e.status&&(t.categoryList=e.data.dataList)}))},onCreate:function(t){var e=document.createElement("a");e.href="#/document/create",e.target="_blank",e.click()},onSubmit:function(){this.$emit("bindSetQuery",this.$props.queryForm)}}},y=g,v=(a("27ba"),Object(m["a"])(y,o,c,!1,null,null,null)),F=v.exports,j=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"data-list"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.dataList,"header-row-class-name":"headerBg","empty-text":"没有项目信息"}},[a("el-table-column",{attrs:{prop:"id",label:"ID",align:"center",width:"80"}}),a("el-table-column",{attrs:{prop:"code",label:"引用名",align:"center",width:"180"}}),a("el-table-column",{attrs:{prop:"name",label:"模板名称",align:"left","min-width":"180"}}),a("el-table-column",{attrs:{prop:"category.name",label:"所属分类",align:"left",width:"120"}}),a("el-table-column",{attrs:{prop:"createTime",label:"创建时间",align:"center",width:"160"}}),a("el-table-column",{attrs:{prop:"status",label:"模板状态",align:"center",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[5==e.row.status?a("div",[t._v("启用")]):t._e(),6==e.row.status?a("div",[t._v("停用")]):t._e()]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",align:"center",width:"180"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"btns"},[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(a){return t.btnEdit(e.row.id)}}},[a("svg-icon",{attrs:{"icon-class":"edit"}}),t._v("编辑")],1),a("el-button",{attrs:{type:"danger",size:"small"},on:{click:function(a){return t.btnDelete(e.row.id)}}},[a("svg-icon",{attrs:{"icon-class":"delete"}}),t._v("删除")],1)],1)]}}])})],1),a("div",{staticClass:"page-info"},[a("el-pagination",{attrs:{"page-size":t.queryForm.pageSize,total:t.recordCount,"page-count":t.pageTotal,background:"",layout:"prev, pager, next"},on:{"current-change":t.ChangePage},model:{value:t.queryForm.page,callback:function(e){t.$set(t.queryForm,"page",e)},expression:"queryForm.page"}})],1)],1)},O=[],_=a("5530"),w=(a("4de4"),a("d3b7"),a("ac1f"),a("841c"),a("2f62")),x={components:{dataInfo:p},directives:{elDragDialog:h["a"]},props:{queryForm:{type:Object,default:function(){return{page:1,pageSize:10,name:"",sign:""}}}},watch:{queryForm:{handler:function(t){this.search()},deep:!0}},computed:Object(_["a"])({},Object(w["b"])(["roleInfo","authList"])),data:function(){return{dialogVisible:!1,currentDataId:0,recordCount:0,pageTotal:1,dataList:[],currentData:{}}},mounted:function(){this.search()},methods:{checkAuth:function(t){if(1==this.roleInfo.is_admin)return!0;var e=this.authList.filter((function(e){return 999==e.type&&e.path==t}));return e.length>0},btnDelete:function(t){var e=this,a={id:t};e.$confirm("您是否确认删除该记录?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then((function(t){Object(b["c"])(a).then((function(t){e.search()}))})).catch((function(){}))},searchData:function(){var t=this;t.dialogVisible=!1,t.search()},btnEdit:function(t){var e=document.createElement("a");e.href="#/document/create?templateId="+t,e.target="_blank",e.click()},handleClose:function(){var t=this;t.currentDataId=0,t.dialogVisible=!1,t.search()},search:function(){var t=this;Object(b["i"])(t.queryForm).then((function(e){e&&(t.dataList=e.data.dataList,t.recordCount=e.data.totalRecord,t.pageTotal=e.data.totalPage)}))},ChangePage:function(t){var e=this;e.queryForm.page=t,e.search()}}},k=x,C=(a("5c41"),Object(m["a"])(k,j,O,!1,null,null,null)),q=C.exports,S={components:{dataSearch:F,dataList:q},data:function(){return{queryForm:{page:1,pageSize:10,name:"",parent_id:0,status:""}}},mounted:function(){this.queryForm.parent_id=void 0==this.$route.query.parent_id?0:this.$route.query.parent_id},methods:{setQuery:function(t){this.queryForm=t}}},$=S,L=(a("5930"),Object(m["a"])($,n,r,!1,null,null,null));e["default"]=L.exports},b1bc:function(t,e,a){},c621:function(t,e,a){"use strict";a.d(e,"j",(function(){return r})),a.d(e,"e",(function(){return o})),a.d(e,"b",(function(){return c})),a.d(e,"l",(function(){return i})),a.d(e,"g",(function(){return u})),a.d(e,"d",(function(){return l})),a.d(e,"i",(function(){return s})),a.d(e,"h",(function(){return d})),a.d(e,"c",(function(){return m})),a.d(e,"a",(function(){return f})),a.d(e,"k",(function(){return p})),a.d(e,"f",(function(){return h}));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/all",method:"post",data:t})}function c(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 u(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 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:"/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})}}}]);