chunk-63ecc0e6.d15c2e1d.js 12 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-63ecc0e6","chunk-cecc2e1a"],{"32d9":function(t,e,a){"use strict";a("c39b")},"4e9a":function(t,e,a){"use strict";a("6a2c")},"6a2c":function(t,e,a){},"6c7c":function(t,e,a){"use strict";a.r(e);var o=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)},n=[],r=(a("a9e3"),a("8256")),l={components:{Tinymce:r["a"]},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(){}}},c=l,i=(a("4e9a"),a("2877")),u=Object(i["a"])(c,o,n,!1,null,null,null);e["default"]=u.exports},a888:function(t,e,a){"use strict";a("99af"),a("caad"),a("ac1f"),a("2532"),a("5319");var o={bind:function(t,e,a){var o=t.querySelector(".el-dialog__header"),n=t.querySelector(".el-dialog");o.style.cssText+=";cursor:move;",n.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]}}();o.onmousedown=function(t){var e=t.clientX-o.offsetLeft,l=t.clientY-o.offsetTop,c=n.offsetWidth,i=n.offsetHeight,u=document.body.clientWidth,s=document.body.clientHeight,d=n.offsetLeft,m=u-n.offsetLeft-c,f=n.offsetTop,b=s-n.offsetTop-i,p=r(n,"left"),g=r(n,"top");p.includes("%")?(p=+document.body.clientWidth*(+p.replace(/\%/g,"")/100),g=+document.body.clientHeight*(+g.replace(/\%/g,"")/100)):(p=+p.replace(/\px/g,""),g=+g.replace(/\px/g,"")),document.onmousemove=function(t){var o=t.clientX-e,r=t.clientY-l;-o>d?o=-d:o>m&&(o=m),-r>f?r=-f:r>b&&(r=b),n.style.cssText+=";left:".concat(o+p,"px;top:").concat(r+g,"px;"),a.child.$emit("dragDialog")},document.onmouseup=function(t){document.onmousemove=null,document.onmouseup=null}}}},n=function(t){t.directive("el-drag-dialog",o)};window.Vue&&(window["el-drag-dialog"]=o,Vue.use(n)),o.install=n;e["a"]=o},c39b:function(t,e,a){},c621:function(t,e,a){"use strict";a.d(e,"j",(function(){return n})),a.d(e,"b",(function(){return r})),a.d(e,"m",(function(){return l})),a.d(e,"f",(function(){return c})),a.d(e,"d",(function(){return i})),a.d(e,"h",(function(){return u})),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 b})),a.d(e,"e",(function(){return p})),a.d(e,"k",(function(){return g}));var o=a("b775");function n(t){return Object(o["a"])({url:"/template/category/search",method:"post",data:t})}function r(t){return Object(o["a"])({url:"/template/category/create",method:"post",data:t})}function l(t){return Object(o["a"])({url:"/template/category/update",method:"post",data:t})}function c(t){return Object(o["a"])({url:"/template/category/info",method:"post",data:t})}function i(t){return Object(o["a"])({url:"/template/category/delete",method:"post",data:t})}function u(t){return Object(o["a"])({url:"/document/block/list",method:"post",data:t})}function s(t){return Object(o["a"])({url:"/template/search",method:"post",data:t})}function d(t){return Object(o["a"])({url:"/document/block/info/".concat(t),method:"get"})}function m(t){return Object(o["a"])({url:"/document/block/dele/".concat(t),method:"get"})}function f(t){return Object(o["a"])({url:"/document/block/add",method:"post",data:t})}function b(t){return Object(o["a"])({url:"/document/block/edit",method:"post",data:t})}function p(t){return Object(o["a"])({url:"/template/category/allList",method:"post",data:t})}function g(t){return Object(o["a"])({url:"/template/category/treeCategory",method:"post",data:t})}},defe:function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"data-list"},[a("el-table",{attrs:{data:t.dataList,"header-row-class-name":"headerBg","empty-text":"没有项目信息","max-height":t.tableMaxHeight,align:"center"}},[a("el-table-column",{attrs:{prop:"dcb_id",label:"ID",width:"80"}}),a("el-table-column",{attrs:{prop:"dcb_name",label:"文档块名称"}}),a("el-table-column",{attrs:{prop:"category_id",label:"所属分类"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(t.getCategoryName(e.row.category_id))+" ")]}}])}),a("el-table-column",{attrs:{prop:"dcb_share",label:"共享类型",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.dcb_share?a("div",[t._v("官方")]):t._e(),2==e.row.dcb_share?a("div",[t._v("私有")]):t._e(),3==e.row.dcb_share?a("div",[t._v("共享")]):t._e()]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",align:"center",width:"300"},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.dcb_id)}}},[a("svg-icon",{attrs:{"icon-class":"edit"}}),t._v("编辑模块")],1),a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(a){return t.EditorInfo(e.row)}}},[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.dcb_id)}}},[a("svg-icon",{attrs:{"icon-class":"delete"}}),t._v("删除")],1)],1)]}}])})],1),a("div",{staticClass:"page-info"},[a("el-pagination",{attrs:{currentPage:t.queryForm.page,"page-size":t.queryForm.pageSize,total:t.recordCount,"page-count":t.pageTotal,background:"",layout:"prev, pager, next"},on:{"current-change":t.ChangePage}})],1),a("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{visible:t.dialogVisible,"append-to-body":"","close-on-click-modal":!1,width:"30%","custom-class":"prod-verify",title:"修改模块信息"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("el-form",{ref:"moduleRef",attrs:{model:t.moduleForm,rules:t.moduleRules,"label-position":"left","label-width":"100px"}},[a("el-form-item",{attrs:{label:"文档块名称:",prop:"dcb_name"}},[a("el-input",{staticStyle:{width:"220px"},attrs:{placeholder:"请选择文档块名称"},model:{value:t.moduleForm.dcb_name,callback:function(e){t.$set(t.moduleForm,"dcb_name",e)},expression:"moduleForm.dcb_name"}})],1),a("el-form-item",{attrs:{label:"共享类型:",prop:"dcb_share"}},[a("el-select",{staticClass:"m-2",attrs:{clearable:"",placeholder:"请选择共享类型",size:"large"},model:{value:t.moduleForm.dcb_share,callback:function(e){t.$set(t.moduleForm,"dcb_share",e)},expression:"moduleForm.dcb_share"}},t._l(t.dcbShareList,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),a("el-form-item",{attrs:{label:"模块分类:",prop:"category_id"}},[a("el-select",{staticClass:"m-2",attrs:{placeholder:"请选择模块分类",size:"large"},model:{value:t.moduleForm.category_id,callback:function(e){t.$set(t.moduleForm,"category_id",e)},expression:"moduleForm.category_id"}},t._l(t.categoryList,(function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:t.closeModule}},[t._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:t.submitModule}},[t._v("确 定")])],1)],1)],1)},n=[],r=a("c7eb"),l=a("1da1"),c=a("ade3"),i=a("5530"),u=(a("4de4"),a("7db0"),a("14d9"),a("b0c0"),a("d3b7"),a("ac1f"),a("841c"),a("0643"),a("2382"),a("fffc"),a("2f62")),s=a("c621"),d=a("6c7c"),m=a("a888"),f={components:{dataInfo:d["default"]},directives:{elDragDialog:m["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(i["a"])({},Object(u["b"])(["roleInfo","authList"])),data:function(){return Object(c["a"])(Object(c["a"])(Object(c["a"])(Object(c["a"])(Object(c["a"])(Object(c["a"])(Object(c["a"])(Object(c["a"])({dialogVisible:!1,currentDataId:0,recordCount:0,pageTotal:1,dataList:[],currentData:{}},"dialogVisible",!1),"moduleForm",{name:"",dcb_share:"",category_id:""}),"moduleRules",{dcb_name:[{required:!0,message:"请输入文档块名称",trigger:"blur"}],dcb_share:[{required:!0,message:"请选择共享类型",trigger:"change"}],category_id:[{required:!0,message:"请选择模块分类",trigger:"change"}]}),"props",{value:"id",label:"name",children:"children",checkStrictly:!0}),"statusOptions",[{value:"",label:"请选择状态"},{value:5,label:"启用"},{value:6,label:"停用"}]),"categoryList",[]),"tableMaxHeight",500),"dcbShareList",[{value:1,label:"官方"},{value:2,label:"私有"},{value:3,label:"共享"}])},mounted:function(){this.search(),this.initCategoryList()},methods:{getCategoryName:function(t){var e=this.categoryList.find((function(e){return e.id===t}));return e?e.name:""},refreshList:function(){this.search()},onChangeCategory:function(){},closeModule:function(){this.dialogVisible=!1,this.moduleForm={dcb_name:"",dcb_share:"",category_id:""}},submitModule:function(){var t=this;this.$refs.moduleRef.validate((function(e){e&&Object(s["l"])(t.moduleForm).then((function(e){200===e.code&&(t.$message.success("修改成功!"),t.dialogVisible=!1,t.moduleForm={dcb_name:"",dcb_share:"",category_id:""},t.search())}))}))},initCategoryList:function(){var t=this;return Object(l["a"])(Object(r["a"])().mark((function e(){var a;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t,e.next=3,Object(s["k"])();case 3:a=e.sent,t.categoryList=a.data;case 5:case"end":return e.stop()}}),e)})))()},EditorInfo:function(t){this.dialogVisible=!0,this.moduleForm=t},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;e.$confirm("您是否确认删除该记录?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then((function(a){console.log(t),Object(s["c"])(t).then((function(t){e.search()}))})).catch((function(){}))},searchData:function(){var t=this;t.dialogVisible=!1,t.search()},btnEdit:function(t){this.$router.push("/document/system/document/create?templateId="+t+"&type=module")},handleClose:function(){var t=this;t.currentDataId=0,t.dialogVisible=!1,t.search()},search:function(){var t=this;Object(s["h"])(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()}}},b=f,p=(a("32d9"),a("2877")),g=Object(p["a"])(b,o,n,!1,null,null,null);e["default"]=g.exports}}]);