chunk-68fb515a.045354d4.js 12 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-68fb515a","chunk-db47984e"],{"16ad":function(t,e,n){"use strict";n("3383")},"1c4c":function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return c}));var r=n("b775");function a(t){return Object(r["a"])({url:"/source/data/search",method:"post",data:t})}function o(t){return Object(r["a"])({url:"/source/data/info",method:"post",data:t})}function c(t){return Object(r["a"])({url:"/source/data/find",method:"post",data:t})}},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)},a=[],o=(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)}}}),c=o,i=(n("16ad"),n("2877")),u=Object(i["a"])(c,r,a,!1,null,null,null);e["default"]=u.exports},"424e":function(t,e,n){"use strict";n.d(e,"h",(function(){return a})),n.d(e,"e",(function(){return o})),n.d(e,"l",(function(){return c})),n.d(e,"a",(function(){return i})),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 a(t){return Object(r["a"])({url:"/document/list",method:"post",data:t})}function o(t){return Object(r["a"])({url:"/document/export",method:"post",data:t})}function c(t){return Object(r["a"])({url:"/document/edit",method:"post",data:t})}function i(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})}},4502:function(t,e,n){},"62cf":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",[t._l(t.filteredAttrs,(function(e,r){return["TextArea"==t.com.type?[t.isTextAreaType(e.type)?[n("el-form-item",{attrs:{label:e.id+":"}},[n("span",{staticStyle:{cursor:"pointer"},on:{click:function(n){return t.toggleBackground(e.id)}}},[t._v(t._s(e.content))])])]:t._e(),"formual"==e.type?[n("el-form-item",{attrs:{label:e.id+":"}},[n("span",{staticStyle:{cursor:"pointer"},on:{click:function(n){return t.toggleBackground(e.id)}}},[t._v(t._s(e.formula))])])]:t._e(),"sourceData"==e.type?[n("el-form-item",{attrs:{label:e.id+":"}},[t._v(" "+t._s(t.formatSourceData(e.id,e.formula))+" ")])]:t._e()]:t._e()]}))],2),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()},a=[],o=n("2909"),c=n("b85c"),i=n("c7eb"),u=n("5530"),s=n("1da1"),d=(n("99af"),n("4de4"),n("caad"),n("d81d"),n("14d9"),n("a434"),n("b0c0"),n("e9c4"),n("b64b"),n("d3b7"),n("ac1f"),n("2532"),n("466d"),n("498a"),n("0643"),n("2382"),n("a573"),n("3721")),l=n("a888"),f=n("c621"),m=(n("1c4c"),n("424e"),{name:"attributes",components:{headerSetting:d["default"]},directives:{elDragDialog:l["a"]},emits:["onRefresh"],props:{com:{type:Object,default:function(){return null}}},watch:{com:{handler:function(t){t&&t.content&&this.processContent()},deep:!0}},data:function(){return{dialogVisible:!1,activeNames:"0",categoryList:[],articleCategoryList:[],activeHeaderIndex:-1,headerItemName:"",props:{value:"id",label:"name",children:"children"},processedAttrs:[]}},computed:{filteredAttrs:function(){return console.log("processedAttrs",this.processedAttrs),this.processedAttrs}},mounted:function(){this.initCategoryList(),this.com&&this.com.content&&this.processContent()},methods:{toggleBackground:function(t){var e=document.getElementById(t);e&&("yellow"===e.style.backgroundColor?e.style.backgroundColor="":e.style.backgroundColor="yellow")},updateAllReferences:function(t,e){this.com.attrs.map((function(n){n.name==t.name&&(n.content=e)}))},isTextAreaType:function(t){return!["pager","constant","attr","formual","sourceData","Directory"].includes(t)},extractTemplates:function(t){var e,n=/\{\{(.*?)\}\}/g,r=[];while(null!==(e=n.exec(t)))r.push(e[1].trim());return r},processContent:function(){if(this.com&&this.com.content){var t=this.extractTemplates(this.com.content);this.com.attrs&&Array.isArray(this.com.attrs)&&(this.processedAttrs=this.com.attrs.filter((function(e){return t.includes(e.id)||"formual"===e.type})))}else this.processedAttrs=[]},formatSourceData:function(t,e){var n=/\[(.*?)\]\[(.*?)\]\[(.*?)\]\[(.*?)\]/,r=e.match(n),a=r[4].split(",");return"".concat(t,"=").concat(r[2],".").concat(r[3],".").concat(String.fromCharCode(65+parseInt(a[1]))).concat(parseInt(a[0])+1)},onSaveTemplate:function(t){var e=this;return Object(s["a"])(Object(i["a"])().mark((function n(){var r,a,o;return Object(i["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(r=Object(u["a"])(Object(u["a"])({},t),{},{attrs:JSON.stringify(t.attrs),status:5}),delete r.category,void 0!==r.id&&!e.saveAs){n.next=9;break}return n.next=5,Object(f["a"])(r);case 5:a=n.sent,200===a.status&&(r.id=a.data,e.com.id=a.data,e.$alert("模板信息保存成功"),e.$emit("onRefresh"),e.saveAs=!1),n.next=13;break;case 9:return n.next=11,Object(f["l"])(r);case 11:o=n.sent,200===o.status&&(e.$alert("模板信息更新成功"),e.$emit("onRefresh"));case 13:case"end":return n.stop()}}),n)})))()},initCategoryList:function(){var t=this;return Object(s["a"])(Object(i["a"])().mark((function e(){var n,r,a,o;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(f["j"])({page:1,pageSize:99,status:5});case 2:if(n=e.sent,200!==n.status){e.next=23;break}t.categoryList=n.data.dataList||[],r=Object(c["a"])(t.categoryList),e.prev=6,r.s();case 8:if((a=r.n()).done){e.next=15;break}return o=a.value,e.next=12,t.getTemplateList(o.id);case 12:o.dataList=e.sent;case 13:e.next=8;break;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e["catch"](6),r.e(e.t0);case 20:return e.prev=20,r.f(),e.finish(20);case 23:case"end":return e.stop()}}),e,null,[[6,17,20,23]])})))()},getTemplateList:function(t){return Object(s["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 e.next=2,Object(f["i"])({page:1,pageSize:999,category_id:t,status:5});case 2:if(n=e.sent,200!==n.status){e.next=5;break}return e.abrupt("return",n.data.dataList.map((function(t){return Object(u["a"])(Object(u["a"])({},t),{},{attrs:JSON.parse(t.attrs)})})));case 5:return e.abrupt("return",[]);case 6: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){if(this.currentIndex>=0){var e=this.components[this.currentIndex].components[this.componentIndex].attrs.tableHeader;this.activeHeaderIndex>=0?e[this.activeHeaderIndex]=t:e.push(t)}this.$emit("onSetComponents",Object(o["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(o["a"])(this.components))},onSetActiveIndex:function(t){this.activeHeaderIndex=t===this.activeHeaderIndex?-1:t}}}),p=m,h=(n("a2ff"),n("2877")),b=Object(h["a"])(p,r,a,!1,null,null,null);e["default"]=b.exports},a2ff:function(t,e,n){"use strict";n("4502")},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"),a=t.querySelector(".el-dialog");r.style.cssText+=";cursor:move;",a.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]}}();r.onmousedown=function(t){var e=t.clientX-r.offsetLeft,c=t.clientY-r.offsetTop,i=a.offsetWidth,u=a.offsetHeight,s=document.body.clientWidth,d=document.body.clientHeight,l=a.offsetLeft,f=s-a.offsetLeft-i,m=a.offsetTop,p=d-a.offsetTop-u,h=o(a,"left"),b=o(a,"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,o=t.clientY-c;-r>l?r=-l:r>f&&(r=f),-o>m?o=-m:o>p&&(o=p),a.style.cssText+=";left:".concat(r+h,"px;top:").concat(o+b,"px;"),n.child.$emit("dragDialog")},document.onmouseup=function(t){document.onmousemove=null,document.onmouseup=null}}}},a=function(t){t.directive("el-drag-dialog",r)};window.Vue&&(window["el-drag-dialog"]=r,Vue.use(a)),r.install=a;e["a"]=r},c621:function(t,e,n){"use strict";n.d(e,"j",(function(){return a})),n.d(e,"b",(function(){return o})),n.d(e,"m",(function(){return c})),n.d(e,"f",(function(){return i})),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 a(t){return Object(r["a"])({url:"/template/category/search",method:"post",data:t})}function o(t){return Object(r["a"])({url:"/template/category/create",method:"post",data:t})}function c(t){return Object(r["a"])({url:"/template/category/update",method:"post",data:t})}function i(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})}}}]);