chunk-b8bb9516.2dc935b4.js 14 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b8bb9516","chunk-db47984e"],{"16ad":function(t,e,n){"use strict";n("3383")},"1c4c":function(t,e,n){"use strict";n.d(e,"c",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return i}));var r=n("b775");function o(t){return Object(r["a"])({url:"/source/data/search",method:"post",data:t})}function a(t){return Object(r["a"])({url:"/source/data/info",method:"post",data:t})}function i(t){return Object(r["a"])({url:"/source/data/find",method:"post",data:t})}},"2bfc":function(t,e,n){},3383:function(t,e,n){},3721:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"header-setting"},[n("el-input",{attrs:{placeholder:"请填写表头"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}}),n("div",{staticStyle:{"text-align":"right","margin-top":"20px"}},[n("el-button",{attrs:{type:"warning"},on:{click:t.btnSave}},[t._v("确认保存")])],1)],1)},o=[],a=(n("b0c0"),{emits:["onSetHeader"],props:{headerItemName:{type:String,default:""}},watch:{headerItemName:{handler:function(t){void 0!=t&&(this.form.name=t)},immediate:!0,deep:!0}},data:function(){return{form:{name:""}}},methods:{btnSave:function(t){var e=this;e.$emit("onSetHeader",e.form.name)}}}),i=a,c=(n("16ad"),n("2877")),u=Object(c["a"])(i,r,o,!1,null,null,null);e["default"]=u.exports},"424e":function(t,e,n){"use strict";n.d(e,"h",(function(){return o})),n.d(e,"e",(function(){return a})),n.d(e,"l",(function(){return i})),n.d(e,"a",(function(){return c})),n.d(e,"g",(function(){return u})),n.d(e,"c",(function(){return s})),n.d(e,"i",(function(){return d})),n.d(e,"b",(function(){return l})),n.d(e,"m",(function(){return f})),n.d(e,"f",(function(){return m})),n.d(e,"d",(function(){return p})),n.d(e,"j",(function(){return h})),n.d(e,"k",(function(){return b}));var r=n("b775");function o(t){return Object(r["a"])({url:"/document/list",method:"post",data:t})}function a(t){return Object(r["a"])({url:"/document/export",method:"post",data:t})}function i(t){return Object(r["a"])({url:"/document/edit",method:"post",data:t})}function c(t){return Object(r["a"])({url:"/document/add",method:"post",data:t})}function u(t){return Object(r["a"])({url:"/document/info/".concat(t),method:"get"})}function s(t){return Object(r["a"])({url:"/document/dele/".concat(t),method:"get"})}function d(t){return Object(r["a"])({url:"/document/category/search",method:"post",data:t})}function l(t){return Object(r["a"])({url:"/document/category/create",method:"post",data:t})}function f(t){return Object(r["a"])({url:"/document/category/update",method:"post",data:t})}function m(t){return Object(r["a"])({url:"/document/category/info",method:"post",data:t})}function p(t){return Object(r["a"])({url:"/document/category/delete",method:"post",data:t})}function h(t){return Object(r["a"])({url:"/template/searchList",method:"post",data:t})}function b(t){return Object(r["a"])({url:"/document/list",method:"post",data:t})}},"4ec9":function(t,e,n){"use strict";n("6f48")},"5bfe":function(t,e,n){"use strict";n("2bfc")},6566:function(t,e,n){"use strict";var r=n("7c73"),o=n("edd0"),a=n("6964"),i=n("0366"),c=n("19aa"),u=n("7234"),s=n("2266"),d=n("c6d2"),l=n("4754"),f=n("2626"),m=n("83ab"),p=n("f183").fastKey,h=n("69f3"),b=h.set,v=h.getterFor;t.exports={getConstructor:function(t,e,n,d){var l=t((function(t,o){c(t,f),b(t,{type:e,index:r(null),first:void 0,last:void 0,size:0}),m||(t.size=0),u(o)||s(o,t[d],{that:t,AS_ENTRIES:n})})),f=l.prototype,h=v(e),g=function(t,e,n){var r,o,a=h(t),i=y(t,e);return i?i.value=n:(a.last=i={index:o=p(e,!0),key:e,value:n,previous:r=a.last,next:void 0,removed:!1},a.first||(a.first=i),r&&(r.next=i),m?a.size++:t.size++,"F"!==o&&(a.index[o]=i)),t},y=function(t,e){var n,r=h(t),o=p(e);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key===e)return n};return a(f,{clear:function(){var t=this,e=h(t),n=e.first;while(n)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),n=n.next;e.first=e.last=void 0,e.index=r(null),m?e.size=0:t.size=0},delete:function(t){var e=this,n=h(e),r=y(e,t);if(r){var o=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=o),o&&(o.previous=a),n.first===r&&(n.first=o),n.last===r&&(n.last=a),m?n.size--:e.size--}return!!r},forEach:function(t){var e,n=h(this),r=i(t,arguments.length>1?arguments[1]:void 0);while(e=e?e.next:n.first){r(e.value,e.key,this);while(e&&e.removed)e=e.previous}},has:function(t){return!!y(this,t)}}),a(f,n?{get:function(t){var e=y(this,t);return e&&e.value},set:function(t,e){return g(this,0===t?0:t,e)}}:{add:function(t){return g(this,t=0===t?0:t,t)}}),m&&o(f,"size",{configurable:!0,get:function(){return h(this).size}}),l},setStrong:function(t,e,n){var r=e+" Iterator",o=v(e),a=v(r);d(t,e,(function(t,e){b(this,{type:r,target:t,state:o(t),kind:e,last:void 0})}),(function(){var t=a(this),e=t.kind,n=t.last;while(n&&n.removed)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?l("keys"===e?n.key:"values"===e?n.value:[n.key,n.value],!1):(t.target=void 0,l(void 0,!0))}),n?"entries":"values",!n,!0),f(e)}}},"6f48":function(t,e,n){"use strict";var r=n("6d61"),o=n("6566");r("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),o)},a888:function(t,e,n){"use strict";n("99af"),n("caad"),n("ac1f"),n("2532"),n("5319");var r={bind:function(t,e,n){var r=t.querySelector(".el-dialog__header"),o=t.querySelector(".el-dialog");r.style.cssText+=";cursor:move;",o.style.cssText+=";top:0px;";var a=function(){return window.document.currentStyle?function(t,e){return t.currentStyle[e]}:function(t,e){return getComputedStyle(t,!1)[e]}}();r.onmousedown=function(t){var e=t.clientX-r.offsetLeft,i=t.clientY-r.offsetTop,c=o.offsetWidth,u=o.offsetHeight,s=document.body.clientWidth,d=document.body.clientHeight,l=o.offsetLeft,f=s-o.offsetLeft-c,m=o.offsetTop,p=d-o.offsetTop-u,h=a(o,"left"),b=a(o,"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 r=t.clientX-e,a=t.clientY-i;-r>l?r=-l:r>f&&(r=f),-a>m?a=-m:a>p&&(a=p),o.style.cssText+=";left:".concat(r+h,"px;top:").concat(a+b,"px;"),n.child.$emit("dragDialog")},document.onmouseup=function(t){document.onmousemove=null,document.onmouseup=null}}}},o=function(t){t.directive("el-drag-dialog",r)};window.Vue&&(window["el-drag-dialog"]=r,Vue.use(o)),r.install=o;e["a"]=r},c621:function(t,e,n){"use strict";n.d(e,"j",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"m",(function(){return i})),n.d(e,"f",(function(){return c})),n.d(e,"d",(function(){return u})),n.d(e,"h",(function(){return s})),n.d(e,"i",(function(){return d})),n.d(e,"g",(function(){return l})),n.d(e,"c",(function(){return f})),n.d(e,"a",(function(){return m})),n.d(e,"l",(function(){return p})),n.d(e,"e",(function(){return h})),n.d(e,"k",(function(){return b}));var r=n("b775");function o(t){return Object(r["a"])({url:"/template/category/search",method:"post",data:t})}function a(t){return Object(r["a"])({url:"/template/category/create",method:"post",data:t})}function i(t){return Object(r["a"])({url:"/template/category/update",method:"post",data:t})}function c(t){return Object(r["a"])({url:"/template/category/info",method:"post",data:t})}function u(t){return Object(r["a"])({url:"/template/category/delete",method:"post",data:t})}function s(t){return Object(r["a"])({url:"/document/block/list",method:"post",data:t})}function d(t){return Object(r["a"])({url:"/template/search",method:"post",data:t})}function l(t){return Object(r["a"])({url:"/template/info",method:"post",data:t})}function f(t){return Object(r["a"])({url:"/document/block/dele/".concat(t),method:"get"})}function m(t){return Object(r["a"])({url:"/document/block/add",method:"post",data:t})}function p(t){return Object(r["a"])({url:"/document/block/edit",method:"post",data:t})}function h(t){return Object(r["a"])({url:"/template/category/allList",method:"post",data:t})}function b(t){return Object(r["a"])({url:"/template/category/treeCategory",method:"post",data:t})}},f539:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return null!=t.com?n("div",{staticClass:"editor-attribute"},[n("el-form",[n("el-form-item",{attrs:{label:"模块分类:"}},[n("el-cascader",{attrs:{options:t.categoryList,clearable:"",props:t.props,"show-all-levels":!1,placeholder:"请选择模块分类"},on:{change:t.onChangeCategory},model:{value:t.com.category_id,callback:function(e){t.$set(t.com,"category_id",e)},expression:"com.category_id"}})],1),n("el-form-item",{attrs:{label:"模块名称:"}},[n("el-input",{staticClass:"input-item",attrs:{placeholder:"请填写模块名称"},model:{value:t.com.name,callback:function(e){t.$set(t.com,"name",e)},expression:"com.name"}})],1),n("el-form-item",{attrs:{label:"模块描述:"}},[n("el-input",{staticClass:"input-item",attrs:{type:"textarea",placeholder:"请填写模块介绍"},model:{value:t.com.intro,callback:function(e){t.$set(t.com,"intro",e)},expression:"com.intro"}})],1),n("el-form-item",[n("div",{staticClass:"btn-save"},[n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.onSaveTemplate(t.com)}}},[t._v("保存模块")]),t.com.id>0?n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.onSaveAs(t.com)}}},[t._v("另存为")]):t._e()],1)])],1),n("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{visible:t.dialogVisible,"append-to-body":"",width:"300","custom-class":"prod-verify",title:"编辑表头"},on:{"update:visible":function(e){t.dialogVisible=e}}},[n("headerSetting",{attrs:{headerItemName:t.headerItemName},on:{onSetHeader:t.onSetHeader}})],1)],1):t._e()},o=[],a=n("2909"),i=n("c7eb"),c=n("1da1"),u=n("5530"),s=(n("d81d"),n("14d9"),n("a434"),n("b0c0"),n("e9c4"),n("4ec9"),n("b64b"),n("d3b7"),n("4d63"),n("c607"),n("ac1f"),n("2c3e"),n("25f0"),n("3ca3"),n("466d"),n("0643"),n("4e3e"),n("a573"),n("159b"),n("ddb0"),n("3721")),d=n("a888"),l=n("c621"),f=(n("1c4c"),n("424e"),{name:"attributes",components:{headerSetting:s["default"]},directives:{elDragDialog:d["a"]},emits:["onRefresh"],props:{com:{type:Object,default:function(){return null}}},watch:{},data:function(){return{dialogVisible:!1,activeNames:"0",categoryList:[],articleCategoryList:[],activeHeaderIndex:-1,headerItemName:"",props:{value:"id",label:"name",children:"children",checkStrictly:!0}}},mounted:function(){this.initCategoryList()},methods:{formatSourceData:function(t,e){var n=/\[(.*?)\]\[(.*?)\]\[(.*?)\]\[(.*?)\]/,r=new RegExp(n),o=e.match(r),a=t+"="+o[2]+"."+o[3],i=o[4];return i=o[4].split(","),a+="."+String.fromCharCode(65+parseInt(i[1]))+(parseInt(i[0])+1),a},onSaveAs:function(t){this.saveAs=!0,this.onSaveTemplate()},onChangeCategory:function(t){this.com.category_id=t[t.length-1]},onSaveTemplate:function(t){var e=this,n=this,r=JSON.parse(JSON.stringify(t));r.attrs=JSON.stringify(r.attrs),r.code=r.name,r.status=5,r.category_id=this.com.category_id,void 0==r.id||this.saveAs?Object(l["a"])(r).then((function(t){200==t.status&&(r.id=t.data,n.com.id=t.data,n.$alert("模板信息保存成功"),n.$emit("onRefresh"),e.saveAs=!1)})):Object(l["l"])(r).then((function(t){200==t.status&&(n.$alert("模板信息更新成功"),n.$emit("onRefresh"))}))},processDataForCascader:function(t){console.log("Raw data:",t);var e=new Map,n=[];return t.forEach((function(t){var n=Object(u["a"])(Object(u["a"])({},t),{},{children:[]});e.set(t.id,n)})),t.forEach((function(t){if("0"===t.parent_id||0===t.parent_id)n.push(e.get(t.id));else{var r=e.get(parseInt(t.parent_id));r?r.children.push(e.get(t.id)):(console.warn("Parent with id ".concat(t.parent_id," not found for item:"),t),n.push(e.get(t.id)))}})),console.log("Processed data:",n),n},initCategoryList:function(){var t=this;return Object(c["a"])(Object(i["a"])().mark((function e(){var n;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t,e.next=3,Object(l["e"])();case 3:n=e.sent,t.categoryList=t.processDataForCascader(n.data);case 5:case"end":return e.stop()}}),e)})))()},onModify:function(t,e,n){this.currentIndex=t,this.componentIndex=e,this.activeHeaderIndex=n,this.headerItemName=this.components[t].components[e].attrs.tableHeader[n],this.dialogVisible=!0},onSetHeader:function(t){this.currentIndex>=0&&(this.activeHeaderIndex>=0?this.components[this.currentIndex].components[this.componentIndex].attrs.tableHeader[this.activeHeaderIndex]=t:this.components[this.currentIndex].components[this.componentIndex].attrs.tableHeader.push(t)),this.$emit("onSetComponents",Object(a["a"])(this.components)),this.dialogVisible=!1},onInsert:function(t,e){this.currentIndex=t,this.componentIndex=e,this.headerItemName="",this.dialogVisible=!0},onDeleteHeaderItem:function(t,e,n){this.components[t].components[e].attrs.tableHeader.splice(n,1),this.$emit("onSetComponents",Object(a["a"])(this.components))},onSetActiveIndex:function(t){t==this.activeHeaderIndex?this.activeHeaderIndex=-1:this.activeHeaderIndex=t},getTemplateList:function(t){var e=this;return Object(c["a"])(Object(i["a"])().mark((function n(){var r,o;return Object(i["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e,n.next=3,Object(l["i"])({page:1,pageSize:999,category_id:t,status:5});case 3:if(r=n.sent,200==r.status){n.next=6;break}return n.abrupt("return",[]);case 6:return o=r.data.dataList.map((function(t){return t.attrs=JSON.parse(t.attrs),t})),n.abrupt("return",o);case 8:case"end":return n.stop()}}),n)})))()}}}),m=f,p=(n("5bfe"),n("2877")),h=Object(p["a"])(m,r,o,!1,null,null,null);e["default"]=h.exports}}]);