(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-195db380"],{"03d4":function(t,e,a){},"090f":function(t,e,a){"use strict";a("9f7d")},"0fee":function(t,e,a){},1:function(t,e){},10:function(t,e){},"101d":function(t,e,a){},11:function(t,e){},12:function(t,e){},13:function(t,e){},"130d":function(t,e,a){"use strict";a("fff4")},14:function(t,e){},15:function(t,e){},16:function(t,e){},1798:function(t,e,a){"use strict";a("61a8")},"1c4c":function(t,e,a){"use strict";a.d(e,"i",(function(){return r})),a.d(e,"b",(function(){return o})),a.d(e,"k",(function(){return s})),a.d(e,"d",(function(){return i})),a.d(e,"g",(function(){return c})),a.d(e,"h",(function(){return l})),a.d(e,"a",(function(){return u})),a.d(e,"j",(function(){return d})),a.d(e,"f",(function(){return _})),a.d(e,"c",(function(){return m})),a.d(e,"e",(function(){return p}));var n=a("b775");function r(t){return Object(n["a"])({url:"source/data/categories/",method:"post",data:t})}function o(t){return Object(n["a"])({url:"source/data/categories/create/",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/source/data/category/update",method:"post",data:t})}function i(t){return Object(n["a"])({url:"/source/data/category/delete",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/source/data/category/info",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/source/data/search",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/source/data/create",method:"post",data:t})}function d(t){return Object(n["a"])({url:"/source/data/update",method:"post",data:t})}function _(t){return Object(n["a"])({url:"/source/data/info",method:"post",data:t})}function m(t){return Object(n["a"])({url:"/source/data/delete",method:"post",data:t})}function p(t){return Object(n["a"])({url:"/source/data/find",method:"post",data:t})}},2:function(t,e){},"203e":function(t,e,a){"use strict";a("0fee")},2189:function(t,e,a){"use strict";a("f48c")},"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 s})),a.d(e,"e",(function(){return i})),a.d(e,"c",(function(){return c})),a.d(e,"h",(function(){return l})),a.d(e,"b",(function(){return u})),a.d(e,"j",(function(){return d})),a.d(e,"f",(function(){return _})),a.d(e,"d",(function(){return m}));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 s(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 c(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 u(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 _(t){return Object(n["a"])({url:"/project/info",method:"post",data:t})}function m(t){return Object(n["a"])({url:"/project/delete",method:"post",data:t})}},"2a84":function(t,e,a){"use strict";a("d59f")},3:function(t,e){},"323b":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:"doc-container"},[a("div",{staticClass:"editor-top"},[a("div",{staticClass:"left"},[a("div",{staticClass:"doc"},[a("span",[t._v("当前打开文档:")]),t._v(t._s(""==t.docAttr.title?"新建模块":t.docAttr.title)+" ")]),null!=t.userInfo?a("div",{staticClass:"creator"},[a("span",[t._v("创建者:")]),t._v(t._s(t.userInfo.username)+" ")]):t._e()]),a("div",{staticClass:"right"},[t.docAttr.id>0?a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.onSaveAs}},[t._v("另存为")]):t._e(),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.onSave}},[t._v("保存")]),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.onOpenView}},[t._v("预览导出 ")]),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.onClose}},[t._v(" 关闭文档 ")])],1)]),a("div",{staticClass:"editor-content"},[a("div",{staticClass:"neary-doc"},[a("div",{staticClass:"left-content"},[a("div",{staticClass:"search"},[a("el-input",{attrs:{placeholder:"搜索文档标题"}})],1),a("div",{staticClass:"new-article"},[a("el-collapse",{attrs:{accordion:!0},on:{change:t.handleItemClick},model:{value:t.activeNames,callback:function(e){t.activeNames=e},expression:"activeNames"}},[0==t.showView?a("el-collapse-item",{attrs:{title:"最新文档",name:"-1"}},t._l(t.articleList,(function(e,n){return a("div",{key:e.id,staticClass:"sub-menus",attrs:{draggable:"","data-index":n,"data-type":"article"}},[a("div",{on:{click:function(a){return t.onLoadArticle(e)}}},[t._v(t._s(e.title))])])})),0):t._e(),1==t.showView?a("div",t._l(t.categoryList,(function(e,n){return a("el-collapse-item",{key:n,attrs:{title:e.name,name:e.id}},[a("el-collapse",{model:{value:t.nestedActiveNames,callback:function(e){t.nestedActiveNames=e},expression:"nestedActiveNames"}},t._l(t.childrenList,(function(e,n){return a("el-collapse-item",{key:n,attrs:{title:e.name,name:e.id}},[a("draggable",{attrs:{options:{group:{name:"itxst",pull:"clone"},sort:!0},animation:"300"},model:{value:e.dataList,callback:function(a){t.$set(e,"dataList",a)},expression:"child.dataList"}},[a("transition-group",t._l(e.dataList,(function(e,n){return a("div",{key:n,staticClass:"sub-menus"},[a("div",[t._v(t._s(e.name))])])})),0)],1)],1)})),1),a("draggable",{attrs:{options:{group:{name:"itxst",pull:"clone"},sort:!0},animation:"300"},model:{value:e.dataList,callback:function(a){t.$set(e,"dataList",a)},expression:"item.dataList"}},[a("transition-group",t._l(e.dataList,(function(e,n){return a("div",{key:n,staticClass:"sub-menus"},[a("div",[t._v(t._s(e.name))])])})),0)],1)],1)})),1):t._e()],1)],1)])]),a("div",{staticClass:"right-sidebarew"},[a("div",{staticClass:"sidebar-item",class:0==t.showView?"active-item":"",on:{click:t.viewDocument}},[t._v(" 查看文档 ")]),a("div",{staticClass:"sidebar-item",class:1==t.showView?"active-item":"",on:{click:t.viewModule}},[t._v(" 查看模块 ")])]),a("div",{staticClass:"editor-main"},[a("div",{staticClass:"menus-box"},[a("menus",{on:{onEvents:t.onInsert,onVariable:t.uptadeVariable}})],1),a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"tabHtml",staticClass:"editor-box"},[a("editor",{attrs:{coms:t.coms,comIndex:t.comIndex,isAdmin:t.isAdmin,templateCate:t.categoryList,insertCmd:t.insertCmd},on:{onSetActiveIndex:t.onSetActiveIndex,onInsert:t.onInsert,onLoadArticle:t.onLoadArticle,onDelete:t.onRemove,onRebuild:t.onRebuild,onSetComs:t.onSetComs}})],1)]),a("div",{staticClass:"editor-option"},[a("div",{staticClass:"editor-menu"},[a("div",{staticClass:"item",class:9999==t.comIndex?"active-item":"",on:{click:function(e){return t.onSetActiveIndex(9999)}}},[a("span",{staticClass:"name"},[t._v("文档属性")])]),a("div",{staticClass:"item",class:9998==t.comIndex?"active-item":"",on:{click:function(e){return t.onSetActiveIndex(9998)}}},[a("span",{staticClass:"name"},[t._v("模块管理")])]),a("div",{staticClass:"item",class:9997==t.comIndex?"active-item":"",on:{click:function(e){return t.onSetActiveIndex(9997)}}},[a("span",{staticClass:"name"},[t._v("目录信息")])]),a("div",{staticClass:"item",class:1==t.AttributeIndex?"active-item":"",on:{click:function(e){return t.onAttributeIndex(1)}}},[a("span",{staticClass:"name"},[t._v("属性变量")])])]),9999==t.comIndex?[a("docAttr",{attrs:{attrs:t.docAttr}})]:t._e(),9998==t.comIndex?[a("comList",{attrs:{coms:t.coms},on:{onRemove:t.onRemove,onSetActive:t.onSetActiveIndex,onRebuild:t.onRebuild}})]:t._e(),9997==t.comIndex?[a("Directory",{attrs:{coms:t.coms}})]:t._e(),9999!=t.comIndex&&9998!=t.comIndex&&9997!=t.comIndex&&1!=t.AttributeIndex?[a("Attribute",{attrs:{com:t.coms[t.comIndex]},on:{onRefresh:t.initCategoryList}})]:t._e(),1==t.AttributeIndex?[a("attributeVar",{attrs:{com:t.coms[t.comIndex]},on:{onRefresh:t.initCategoryList}})]:t._e()],2)]),a("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{visible:t.showViewForm,"append-to-body":"",width:"850px","custom-class":"prod-verify",title:"文档预览"},on:{"update:visible":function(e){t.showViewForm=e}}},[a("ViewForm",{attrs:{coms:t.coms,docAttr:t.docAttr}})],1),a("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{visible:t.showProductAttr,"append-to-body":"",width:"850px","custom-class":"prod-verify",title:"插入产品属性"},on:{"update:visible":function(e){t.showProductAttr=e}}},[a("ProductAttr",{attrs:{docAttr:t.docAttr},on:{onInsertProductAttr:t.onInsertProductAttr}})],1)],1)},r=[],o=a("2909"),s=a("5530"),i=a("b85c"),c=a("c7eb"),l=a("1da1"),u=(a("d81d"),a("a434"),a("b0c0"),a("e9c4"),a("b64b"),a("ac1f"),a("841c"),a("53ca")),d=a("d4ec"),_=a("bee2"),m=(a("fb6a"),a("d3b7"),a("25f0"),function(){function t(){Object(d["a"])(this,t)}return Object(_["a"])(t,[{key:"formatDate",value:function(t){var e=new Date(t),a=e.getFullYear(),n=e.getMonth()+1;n=n<10?"0"+n:n;var r=e.getDate();r=r<10?"0"+r:r;var o=e.getHours();o=o<10?"0"+o:o;var s=e.getMinutes();s=s<10?"0"+s:s;var i=e.getSeconds();return i=i<10?"0"+i:i,a+"-"+n+"-"+r+" "+o+":"+s+":"+i}},{key:"forEach",value:function(t,e){if(null!==t&&"undefined"!==typeof t)if("object"!==Object(u["a"])(t)&&(t=[t]),this.isArray(t))for(var a=0,n=t.length;a0?O(e.dataForm).then((function(t){e.$alter("公式更新成功")})):y(e.dataForm).then((function(t){e.$alter("公式创建的成功")})),e.$emit("onClose")},getInfo:function(t){var e=this,a={id:t};x(a).then((function(t){t&&200==t.status&&(e.dataForm=t.data)}))},onChangeStatus:function(t){this.dataForm.status=t},onChangeCategory:function(t){var e=this;e.dataForm.categoryId=t}}}),w=E,D=(a("6ae4"),a("2877")),I=Object(D["a"])(w,k,C,!1,null,null,null),P=I.exports,L=a("a888"),A={name:"Formula",emits:["onPicked"],directives:{elDragDialog:L["a"]},components:{dataInfo:P},data:function(){return{dataId:0,dialogVisible:!1,title:"创建公式",queryForm:{page:1,pageSize:10,name:""},recordCount:0,pageTotal:1,dataList:[]}},mounted:function(){this.onBtnSearch()},methods:{onBtnCreate:function(t){var e=this;e.title="创建公式",e.dataId=0,e.dialogVisible=!0},btnOnEdit:function(t){this.title="编辑公式",this.dataId=t,this.dialogVisible=!0},onClose:function(t){var e=this;e.dialogVisible=!1,e.onBtnSearch()},onBtnSearch:function(t){var e=this;e.queryForm.page=1,e.search()},btnPicked:function(t){this.$emit("onPicked",t)},search:function(){var t=this;j(t.queryForm).then((function(e){200==e.status&&(t.dataList=e.data.dataList,t.recordCount=e.data.recordCount,t.pageTotal=e.data.pageTotal)}))},ChangePage:function(t){var e=this;e.queryForm.page=t,e.search()}}},M=A,T=(a("090f"),Object(D["a"])(M,b,v,!1,null,null,null)),R=T.exports,S=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"com-formual"},[a("el-form",[a("el-form-item",[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择状态",size:"large"},on:{change:t.onChangeTab},model:{value:t.tableCode,callback:function(e){t.tableCode=e},expression:"tableCode"}},t._l(t.tableList,(function(t,e){return a("el-option",{key:t.id,attrs:{label:t.name,value:e}})})),1)],1),t.fileLoadStatus?a("el-form-item",{staticStyle:{"min-height":"500px"}},[a("div",{ref:"luckysheet",staticStyle:{width:"100%",height:"500px"},attrs:{id:"luckysheet"}})]):t._e()],1),a("el-dialog",{attrs:{visible:t.showConfirm,title:"数据确认",width:"500","align-center":"","append-to-body":!0},on:{"update:visible":function(e){t.showConfirm=e}},scopedSlots:t._u([{key:"footer",fn:function(){return[a("div",{staticClass:"dialog-footer"},[a("el-button",{on:{click:function(e){t.showConfirm=!1}}},[t._v("关闭")]),a("el-button",{attrs:{type:"primary"},on:{click:t.onConfirm}},[t._v(" 确认选择 ")])],1)]},proxy:!0}])},[a("div",[t._v("当前工作表:"+t._s(t.position.sheet)+" ")]),a("div",[t._v("当前取值:"+t._s(t.position.value))])])],1)},U=[],F=a("ade3"),B=a("1c4c"),$=(a("f7e6"),{name:"SourceData",emits:["onPicked"],components:{},data:function(){return{tableCode:"",tableList:[],showConfirm:!1,fileLoadStatus:!1,position:{tb:"",c:0,r:0,sheet:"",value:""}}},mounted:function(){this.initTableList()},methods:{onConfirm:function(t){this.showConfirm=!1,this.$emit("onPicked",this.position)},onChangeTab:function(t){var e=this,a=e.tableList[t];e.fileLoadStatus=!0,a.sourceData=JSON.parse(a.source_data),e.position.tb=a.code,e.$nextTick((function(){luckysheet.destroy(),luckysheet.create(Object(F["a"])(Object(F["a"])(Object(F["a"])({container:"luckysheet",data:a.sourceData.exportJson.sheets,lang:"zh",showinfobar:!1,showstatisticBar:!1,sheetBottomConfig:!1,allowEdit:!1,enableAddRow:!1,enableAddCol:!1,sheetFormulaBar:!1,enableAddBackTop:!1,showsheetbar:!0},"enableAddRow",!1),"showsheetbarConfig",{add:!1,menu:!1}),"hook",{cellMousedown:function(t,a,n,r){e.position.sheet=n.name,e.position.r=a.r,e.position.c=a.c,t.v?e.position.value=t.v:(e.position.value="",t.ct.s.map((function(t){e.position.value+=t.v}))),e.showConfirm=!0},cellUpdated:function(t,e,a,n,r){}}))}))},initTableList:function(){var t=this;Object(B["h"])({page:1,pageSize:999,status:5}).then((function(e){200==e.status&&(t.tableList=e.data.dataList)}))}}}),W=$,K=(a("2189"),Object(D["a"])(W,S,U,!1,null,null,null)),N=K.exports,q=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"com-formual"},[a("el-form",[a("el-form-item",[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择模型",size:"large"},on:{change:t.onChangeTab},model:{value:t.tableCode,callback:function(e){t.tableCode=e},expression:"tableCode"}},[a("el-option",{attrs:{label:"测试模型",value:0}})],1)],1),a("el-form-item",[t.showSearch?a("el-input",{on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.retrieval(e)}},model:{value:t.dataIntro,callback:function(e){t.dataIntro=e},expression:"dataIntro"}},[a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:t.retrieval},slot:"append"})],1):t._e()],1),t.fileLoadStatus?a("el-form-item",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{"min-height":"200px"}},[a("div",[t._v("当前回答内容:"+t._s(t.textInfo))]),a("div",{staticClass:"dialog-footer",staticStyle:{display:"flex","justify-content":"flex-end"}},[a("el-button",{attrs:{type:"primary"},on:{click:t.onConfirm}},[t._v(" 确认选择 ")])],1)]):t._e()],1)],1)},z=[],H=a("bc3a"),V=a.n(H),J={name:"SourceAi",emits:["onPicked"],components:{},data:function(){return{tableCode:"",tableList:[],showConfirm:!1,fileLoadStatus:!1,showSearch:!1,position:{tb:"",c:0,r:0,sheet:"",value:""},dataIntro:"",textInfo:"",loading:!1,searchResult:{}}},mounted:function(){this.initTableList()},methods:{retrieval:function(){var t=this;return Object(l["a"])(Object(c["a"])().mark((function e(){var a;return Object(c["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.fileLoadStatus=!0,t.loading=!0,e.prev=2,e.next=5,V.a.post("http://58.246.234.210:7860/api/v1/run/3f84a841-cefd-44b3-9555-568cc3b6c2d2?stream=false",{input_value:t.dataIntro,output_type:"chat",input_type:"chat",tweaks:{"ChatInput-em6qC":{},"ParseData-yO3YQ":{},"Prompt-Wj75b":{},"ChatOutput-zy9na":{},"SplitText-O1knk":{},"File-4j6Zd":{},"OllamaEmbeddings-xbYXX":{},"Chroma-OIejP":{},"OllamaModel-04mEO":{},"OllamaEmbeddings-UGvLP":{},"Chroma-HzukO":{}}},{headers:{"Content-Type":"application/json"}});case 5:a=e.sent,200===a.status&&(t.textInfo=a.data.outputs[0].outputs[0].results.message.data.text,t.searchResult={searchTerm:t.dataIntro,result:t.textInfo}),e.next=13;break;case 9:e.prev=9,e.t0=e["catch"](2),console.error("Error during retrieval:",e.t0),t.$message.error("检索失败,请稍后重试");case 13:return e.prev=13,t.loading=!1,e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[2,9,13,16]])})))()},onConfirm:function(t){this.$emit("onPicked",this.searchResult)},onChangeTab:function(t){var e=this;e.showSearch=!0},initTableList:function(){var t=this;Object(B["h"])({page:1,pageSize:999,status:5}).then((function(e){200==e.status&&(t.tableList=e.data.dataList)}))}}},G=J,Y=(a("2a84"),Object(D["a"])(G,q,z,!1,null,null,null)),X=Y.exports,Q=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"com-formual"},[a("el-form",[a("el-form-item",[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择模型",size:"large"},on:{change:t.onChangeTab},model:{value:t.tableCode,callback:function(e){t.tableCode=e},expression:"tableCode"}},[a("el-option",{attrs:{label:"测试模型",value:0}})],1)],1),a("el-form-item",[t.showSearch?a("el-input",{on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.retrieval(e)}},model:{value:t.dataIntro,callback:function(e){t.dataIntro=e},expression:"dataIntro"}},[a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:t.retrieval},slot:"append"})],1):t._e()],1),t.fileLoadStatus?a("el-form-item",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{"min-height":"200px"}},[a("div",[t._v("当前回答内容:"+t._s(t.textInfo))])]):t._e()],1)],1)},Z=[],tt={name:"SourceEs",emits:["onPicked"],components:{},data:function(){return{tableCode:"",tableList:[],showConfirm:!1,fileLoadStatus:!1,showSearch:!1,position:{tb:"",c:0,r:0,sheet:"",value:""},dataIntro:"",textInfo:"",loading:!1,searchResult:{}}},mounted:function(){this.initTableList()},methods:{retrieval:function(){var t=this;return Object(l["a"])(Object(c["a"])().mark((function e(){var a;return Object(c["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.fileLoadStatus=!0,t.loading=!0,e.prev=2,e.next=5,V.a.post("http://58.246.234.210:7860/api/v1/run/3f84a841-cefd-44b3-9555-568cc3b6c2d2?stream=false",{input_value:t.dataIntro,output_type:"chat",input_type:"chat",tweaks:{"ChatInput-em6qC":{},"ParseData-yO3YQ":{},"Prompt-Wj75b":{},"ChatOutput-zy9na":{},"SplitText-O1knk":{},"File-4j6Zd":{},"OllamaEmbeddings-xbYXX":{},"Chroma-OIejP":{},"OllamaModel-04mEO":{},"OllamaEmbeddings-UGvLP":{},"Chroma-HzukO":{}}},{headers:{"Content-Type":"application/json"}});case 5:a=e.sent,200===a.status&&(t.textInfo=a.data.outputs[0].outputs[0].results.message.data.text),e.next=13;break;case 9:e.prev=9,e.t0=e["catch"](2),console.error("Error during retrieval:",e.t0),t.$message.error("检索失败,请稍后重试");case 13:return e.prev=13,t.loading=!1,e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[2,9,13,16]])})))()},onConfirm:function(t){this.$emit("onPicked",this.searchResult)},onChangeTab:function(t){var e=this;e.showSearch=!0},initTableList:function(){var t=this;Object(B["h"])({page:1,pageSize:999,status:5}).then((function(e){200==e.status&&(t.tableList=e.data.dataList)}))}}},et=tt,at=Object(D["a"])(et,Q,Z,!1,null,null,null),nt=at.exports,rt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"com-formual"},[1==t.type?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",[a("el-button",{attrs:{type:"primary"},on:{click:t.onBtnSearch}},[a("svg-icon",{attrs:{"icon-class":"search"}}),t._v(" 搜索")],1),a("el-button",{attrs:{type:"primary"},on:{click:t.onBtnCreate}},[a("svg-icon",{attrs:{"icon-class":"plus"}}),t._v(" 新增变量")],1)],1)],1):t._e(),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:"left",width:"150"}}),a("el-table-column",{attrs:{prop:"name",label:"名称",align:"left",width:"150"}}),1==t.type?a("el-table-column",{attrs:{prop:"value",label:"取值","show-overflow-tooltip":"",align:"left","min-width":"150"}}):t._e(),a("el-table-column",{attrs:{prop:"intro",label:"介绍","show-overflow-tooltip":"",align:"left","min-width":"150"}}),a("el-table-column",{attrs:{label:"操作",align:"center",width:1==t.type?250:100},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"btns"},[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(a){return t.btnPicked(e.row)}}},[a("svg-icon",{attrs:{"icon-class":"confirm"}}),t._v("使用")],1),1==t.type?a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(a){return t.btnOnEdit(e.row.id)}}},[a("svg-icon",{attrs:{"icon-class":"edit"}}),t._v("编辑")],1):t._e(),1==t.type?a("el-button",{attrs:{type:"danger",size:"mini"},on:{click:function(a){return t.btnOnDelete(e.row.id)}}},[a("svg-icon",{attrs:{"icon-class":"delete"}}),t._v("删除")],1):t._e()],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),a("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:t.title},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("dataInfo",{attrs:{id:t.dataId,type:t.type},on:{onClose:t.onClose}})],1)],1)},ot=[];a("159b");function st(t){return Object(g["a"])({url:"/params/search",method:"post",data:t})}function it(t){return Object(g["a"])({url:"/params/create",method:"post",data:t})}function ct(t){return Object(g["a"])({url:"/params/update",method:"post",data:t})}function lt(t){return Object(g["a"])({url:"/params/delete",method:"post",data:t})}function ut(t){return Object(g["a"])({url:"/params/info",method:"post",data:t})}var dt=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-input",{model:{value:t.dataForm.code,callback:function(e){t.$set(t.dataForm,"code",e)},expression:"dataForm.code"}})],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.value_type,callback:function(e){t.$set(t.dataForm,"value_type",e)},expression:"dataForm.value_type"}},t._l(t.valueTypeList,(function(t){return a("el-option",{key:t.value,attrs:{label:t.name,value:t.value}})})),1)],1),a("el-form-item",{attrs:{label:"取值:"}},[a("el-input",{model:{value:t.dataForm.value,callback:function(e){t.$set(t.dataForm,"value",e)},expression:"dataForm.value"}})],1),2==t.dataForm.value_type?a("el-form-item",{attrs:{label:"取值范围:"}},[a("el-input",{attrs:{type:"textarea"},model:{value:t.dataForm.value_item,callback:function(e){t.$set(t.dataForm,"value_item",e)},expression:"dataForm.value_item"}})],1):t._e(),a("el-form-item",{attrs:{label:"介绍:"}},[a("el-input",{attrs:{type:"textarea"},model:{value:t.dataForm.intro,callback:function(e){t.$set(t.dataForm,"intro",e)},expression:"dataForm.intro"}})],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)},_t=[],mt={emits:["onClose"],props:{id:{type:Number,default:0},type:{type:Number,default:1}},watch:{type:{handler:function(t){null==t&&t<=0||(this.dataForm.type=t)},immediate:!0,deep:!0},id:{handler:function(t){var e=this;null==t||t<=0||e.getInfo(t)},immediate:!0,deep:!0}},data:function(){return{activeName:"base",currentCategory:[],valueTypeList:[{value:1,name:"文本内容"},{value:2,name:"下拉选择"}],allCategories:[],typeList:[{value:1,name:"变量"},{value:2,name:"常量"}],dataForm:{id:0,type:1,name:"",value:"",value_type:1,value_item:" ",intro:"",status:""},statusOptions:[{value:"",label:"请选择状态"},{value:5,label:"使用中"},{value:6,label:"已停用"}]}},mounted:function(){},methods:{btnSave:function(t){var e=this;1==e.dataForm.value_type&&(e.dataForm.value_item=e.dataForm.value),e.dataForm.id>0?ct(e.dataForm).then((function(t){200==t.status&&(e.$alert("信息更新成功"),e.$emit("onClose"))})):it(e.dataForm).then((function(t){200==t.status&&(e.$alert("信息创建成功"),e.$emit("onClose"))})),e.$emit("onClose")},getInfo:function(t){var e=this,a={id:t};ut(a).then((function(t){t&&200==t.status&&(e.dataForm=t.data)}))},onChangeStatus:function(t){this.dataForm.status=t},onChangeCategory:function(t){var e=this;e.dataForm.categoryId=t}}},pt=mt,ft=(a("3e40"),Object(D["a"])(pt,dt,_t,!1,null,null,null)),ht=ft.exports,bt={name:"searchParams",emits:["onPicked","onData"],directives:{elDragDialog:L["a"]},components:{dataInfo:ht},props:{type:{type:Number,default:1}},watch:{type:{handler:function(t){this.queryForm.type=t,this.onBtnSearch()},immediate:!0,deep:!0},dataList:{handler:function(t,e){var a=this;t.forEach((function(t,n){JSON.stringify(t)!==JSON.stringify(e[n])&&a.$emit("onData",t)}))},deep:!0}},data:function(){return{dataId:0,dialogVisible:!1,title:"创建变量",queryForm:{page:1,pageSize:10,name:"",status:5,type:1},typeList:[{value:1,name:"变量"},{value:2,name:"常量"}],recordCount:0,pageTotal:1,dataList:[]}},mounted:function(){},methods:{onClose:function(t){var e=this;e.dialogVisible=!1,e.onBtnSearch()},btnOnDelete:function(t){var e=this,a={id:t};e.$confirm("您是否确认删除该记录?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then((function(t){lt(a).then((function(t){e.search()}))})).catch((function(){}))},onBtnCreate:function(t){var e=this;e.dataId=0,e.title="创建变量",e.dialogVisible=!0},btnOnEdit:function(t){this.title="修改变量",this.dataId=t,this.dialogVisible=!0},onBtnSearch:function(t){var e=this;e.queryForm.page=1,e.search()},btnPicked:function(t){this.$emit("onPicked",t)},search:function(){var t=this;st(t.queryForm).then((function(e){e&&(t.dataList=e.data.dataList,t.recordCount=e.data.totalRecord,t.pageTotal=e.data.pageTotal)}))},ChangePage:function(t){var e=this;e.queryForm.page=t,e.search()}}},vt=bt,gt=(a("f09a"),Object(D["a"])(vt,rt,ot,!1,null,null,null)),jt=gt.exports,yt={name:"menus",emits:["onEvents","onVariable"],components:{Formula:R,Variable:jt,sourceData:N,sourceAi:X,sourceEs:nt},directives:{elDragDialog:L["a"]},data:function(){return{showFormula:!1,showVariable:!1,showSourceData:!1,showSourceAi:!1,showSourceEs:!1,type:null,insertTitle:"插入变量",menus:[{name:"插入",subMenus:[{key:"article",name:"图文",icon:"insertArticle"},{key:"SourceData",name:"源数据",icon:"sourceData"},{key:"formual",name:"公式",icon:"insertFormula"},{key:"variable",name:"变量",icon:"insertParams"},{key:"attr",name:"属性",icon:"attr"},{key:"Directory",name:"目录",icon:"subject"},{key:"ai",name:"AI模块",icon:"insertAuth"}]}]}},methods:{btnbianl:function(t){this.$emit("onVariable",t)},onPickedAi:function(t){var e={type:"insert",key:"ai",content:t};this.$emit("onEvents",e),this.showSourceAi=!1},onPickedTab:function(t){var e={type:"insert",key:"sourceData",content:t};this.$emit("onEvents",e),this.showSourceData=!1},onPickedFormula:function(t){var e={type:"insert",key:"formual",content:t};this.$emit("onEvents",e),this.showFormula=!1},onPickedVariable:function(t){var e={type:"insert",key:2==t.type?"constant":"variable",content:t};this.$emit("onEvents",e),this.showVariable=!1},onClickMenus:function(t){console.log(t),t.type="insert","formual"==t.key?this.showFormula=!0:"SourceData"==t.key?this.showSourceData=!0:"variable"==t.key||"constant"==t.key?("variable"==t.key?(this.type=1,this.insertTitle="插入变量"):(this.type=2,this.insertTitle="插入常量"),this.showVariable=!0):"ai"==t.key?this.showSourceAi=!0:"aiEs"==t.key?this.showSourceEs=!0:this.$emit("onEvents",t)}}},Ot=yt,xt=(a("a3cf"),Object(D["a"])(Ot,f,h,!1,null,null,null)),kt=xt.exports,Ct=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"editor"},[a("draggable",{staticStyle:{width:"100%"},attrs:{group:"itxst",animation:"300"},on:{add:t.onAdd,update:t.onDragEnd},model:{value:t.comList,callback:function(e){t.comList=e},expression:"comList"}},[a("transition-group",[t._l(t.comList,(function(e,n){return[a("div",{key:n,staticClass:"layers",class:t.comIndex==n?"active-layer":"",attrs:{draggable:""}},[a("div",{staticClass:"main",on:{click:function(e){return t.onSetActive(n)}}},[a(e.type,{tag:"component",attrs:{com:e,coms:t.comList,currentIndex:n,isAdmin:t.isAdmin,insertCmd:t.insertCmd,isEdit:e.isEdit},on:{onUpdate:t.onUpdate,onUpdateAttr:t.onUpdateAttr,onUpdateProdAttr:t.onUpdateProdAttr}})],1),a("div",{staticClass:"label"},[t._v(" "+t._s(e.name)+" "),a("div",{staticClass:"del"},[1!==e.isEdit?a("svg-icon",{staticStyle:{color:"#FFF","margin-right":"10px"},attrs:{"icon-class":"edit"},on:{click:function(e){return t.onEdit(n,1)}}}):a("svg-icon",{staticStyle:{color:"#FFF","margin-right":"10px"},attrs:{"icon-class":"view"},on:{click:function(e){return t.onEdit(n,2)}}}),a("svg-icon",{staticStyle:{color:"#FFF","margin-left":"10px"},attrs:{"icon-class":"delete"},on:{click:function(e){return t.onRemove(n)}}})],1)])])]})),t.comList.length<=0?[a("div",{key:-1,staticClass:"editor-empty"},[a("el-empty",{attrs:{description:"请拖放组件至当前页面"}})],1)]:t._e()],2)],1)],1)},Et=[],wt=a("b76a"),Dt=a.n(wt),It=function(){var t=this,e=t.$createElement,a=t._self._c||e;return null!=t.com?a("div",{staticClass:"template-table"},[a("div",{staticClass:"table"},[a("hot-table",{ref:"hotTable",staticStyle:{width:"100%"},attrs:{settings:t.settings,licenseKey:"non-commercial-and-evaluation"}})],1)]):t._e()},Pt=[],Lt=(a("4de4"),a("5319"),a("e437"),a("c24d")),At=a("8c7e"),Mt=a("cc6f");a("8033"),a("c1cf"),Mt["a"].buildEmpty({licenseKey:"internal-use-in-handsontable",precisionRounding:10,nullDate:{year:1900,month:1,day:1}});var Tt={name:"table",components:{HotTable:Lt["a"]},emits:["onUploadAttr","onUploadItemIndex"],props:{isActive:{type:Boolean,default:!1},currentIndex:{type:Number,default:0},com:{type:Object,default:null},insertCmd:{type:Object,default:null}},watch:{com:{handler:function(t){if(null!=t&&void 0!=t){var e=this;console.log("watch com",t),e.initSetting()}},immediate:!0,deep:!0},isActive:{handler:function(t){void 0==t&&null!=t||(this.settings.readOnly=!t,this.settings.colHeaders=t,this.settings.rowHeaders=t)},immediate:!0,deep:!0},insertCmd:{handler:function(t){null!=t&&this.isActive&&console.log("insertCmd table val",t)},immediate:!0,deep:!0}},data:function(){return{cellStyle:[],settings:{language:"zh-CN",startRows:5,startCols:3},currentFocus:{row:0,col:0}}},created:function(){},methods:{onExport:function(t){var e=this.$refs.hotTable.hotInstance.getPlugin("exportFile"),a=e.exportAsString("csv",{filename:"MyFile"});console.log("str",a)},initSetting:function(){var t,e=this,a=this;a.settings=(t={language:"zh-CN",startRows:1,startCols:6,height:"auto",stretchH:"all",customBorders:!0,licenseKey:"non-commercial-and-evaluation",comments:!0,mergeCells:!0,allowRemoveColumn:!0,allowRemoveRow:!0,copyPaste:{columnsLimit:25,rowsLimit:50,pasteMode:"shift_down",uiContainer:document.body},cell:a.cellStyle,contextMenu:{callback:function(t,e,n){if(console.log("callback",t,e,n),void 0==a.cellStyle&&(a.cellStyle=[]),"importExcel"!=t)if("clearColor"!=t){if(t.length>=8){if("bgColor"==t.substr(0,7)){var r=t.replace("bgColor:",""),o="whiteBg";switch(r){case"red":o="redBg";break;case"gray":o="grayBg";break}for(u=e[0].start.col;u<=e[0].end.col;u++)for(d=e[0].start.row;d<=e[0].end.row;d++){var s=a.cellStyle.filter((function(t){return t.col==u&&t.row==d}));s.length>0?s[0].className.indexOf(o)<0&&(s[0].className+=" "+o):a.cellStyle.push({col:u,row:d,className:o})}return}if("fontColor"==t.substr(0,9)){var i=t.replace("fontColor:",""),c="blackFont";switch(i){case"white":c="whiteFont";break;case"black":c="blackFont";break}void 0==a.cellStyle&&(a.cellStyle=[]);for(u=e[0].start.col;u<=e[0].end.col;u++)for(d=e[0].start.row;d<=e[0].end.row;d++){var l=a.cellStyle.filter((function(t){return t.col==u&&t.row==d}));l.length>0?l[0].className.indexOf(c)<0&&(l[0].className+=" "+c):a.cellStyle.push({col:u,row:d,className:c})}return}}}else{for(var u=e[0].start.col;u<=e[0].end.col;u++)for(var d=e[0].start.row;d<=e[0].end.row;d++)a.cellStyle=a.cellStyle.filter((function(t){return t.col!=u&&t.row!=d}));a.initSetting()}},items:{row_above:{name:"上方插入行",disabled:function(){return 0===this.getSelectedLast()[0]}},row_below:{name:"下方插入行"},col_left:{name:"左侧插入列"},col_right:{name:"右侧插入列"},remove_row:{name:"删除行"},remove_col:{name:"删除列"},sp1:"---------",mergeCells:{name:"合并单元格"},alignment:{name:"对齐"},borders:{name:"边框"},sp2:"---------",importExcel:{name:"导入Excel",key:"importExcel"},sp3:"---------",clearColor:{name:"清除样式",key:"clearColor"},bgColor:{name:"背景颜色",submenu:{items:[{key:"bgColor:red",name:"红色"},{key:"bgColor:gray",name:"灰色"}]}},fontColor:{name:"文字颜色",submenu:{items:[{key:"fontColor:white",name:"白色"},{key:"fontColor:black",name:"黑色"}]}}}},colHeaders:!0,rowHeaders:!0,width:"100%"},Object(F["a"])(Object(F["a"])(Object(F["a"])(Object(F["a"])(Object(F["a"])(Object(F["a"])(Object(F["a"])(Object(F["a"])(Object(F["a"])(Object(F["a"])(t,"height","auto"),"colWidths","auto"),"allowHtml",!0),"filters",!0),"manualRowResize",!0),"manualColumnResize",!0),"manualRowMove",!0),"manualColumnMove",!0),"formulas",{engine:Mt["a"]}),"tableClassName","tb-class"),Object(F["a"])(t,"afterOnCellMouseDown",(function(t,a,n){e.currentFocus=a}))),Object(At["a"])()}}},Rt=Tt,St=(a("924b"),Object(D["a"])(Rt,It,Pt,!1,null,null,null)),Ut=St.exports,Ft=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"template-textarea"},[1==t.isEdit?[a("div",{staticClass:"editor-area"},[a("ckeditor",{ref:"editor",attrs:{config:t.editorConfig,editorUrl:t.editorUrl},on:{focus:t.onFocus,blur:t.onBlur,input:t.onInputText,ready:t.onEditorReady},model:{value:t.com.content,callback:function(e){t.$set(t.com,"content",e)},expression:"com.content"}})],1)]:[a("div",{staticClass:"rich-editor",domProps:{innerHTML:t._s(t.content)}})]],2)},Bt=[],$t=a("a27d"),Wt=$t["a"],Kt=(a("130d"),Object(D["a"])(Wt,Ft,Bt,!1,null,null,null)),Nt=Kt.exports,qt=a("37de"),zt={name:"editor",emits:["onSetActiveIndex","onDelete","onInsert","onLoadArticle","onRebuild","onSetComs"],components:{Table:Ut,TextArea:Nt,draggable:Dt.a,Empty:qt["default"]},props:{coms:{type:Array,default:null},comIndex:{type:Number,default:0},templateCate:{type:Array,default:function(){return[]}},insertCmd:{type:Object,default:null},isAdmin:{type:Number,default:2}},watch:{coms:{handler:function(t){null!=t&&(this.comList=JSON.parse(JSON.stringify(t)))},immediate:!0,deep:!0},comIndex:{handler:function(t){t<=0||(this.comList=this.comList.map((function(t){return t.isEdit=2,t})))},immediate:!0,deep:!0}},data:function(){return{showEditor:!1,operation:"",id:0,comList:[]}},methods:{onUpdateProdAttr:function(t,e,a){this.comList[t].attrs[e].content=a;for(var n=this.comList[t].attrs[e].attrs.name,r=this.comList[t].attrs[e].attrs.type,o=0;o0?a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.onSaveAs(t.com)}}},[t._v("另存为")]):t._e()],1)])],1),a("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}}},[a("headerSetting",{attrs:{headerItemName:t.headerItemName},on:{onSetHeader:t.onSetHeader}})],1)],1):t._e()},Yt=[],Xt=(a("4d63"),a("2c3e"),a("466d"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"header-setting"},[a("el-input",{attrs:{placeholder:"请填写表头"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}}),a("div",{staticStyle:{"text-align":"right","margin-top":"20px"}},[a("el-button",{attrs:{type:"warning"},on:{click:t.btnSave}},[t._v("确认保存")])],1)],1)}),Qt=[],Zt={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)}}},te=Zt,ee=(a("7e4c"),Object(D["a"])(te,Xt,Qt,!1,null,null,null)),ae=ee.exports,ne=a("c621"),re={name:"attributes",components:{headerSetting:ae},directives:{elDragDialog:L["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"}}},mounted:function(){this.initCategoryList()},methods:{formatSourceData:function(t,e){var a=/\[(.*?)\]\[(.*?)\]\[(.*?)\]\[(.*?)\]/,n=new RegExp(a),r=e.match(n),o=t+"="+r[2]+"."+r[3],s=r[4];return s=r[4].split(","),o+="."+String.fromCharCode(65+parseInt(s[1]))+(parseInt(s[0])+1),o},onSaveAs:function(t){this.saveAs=!0,this.onSaveTemplate()},onChangeCategory:function(t){var e=this;e.com.category_id=t[1]},onSaveTemplate:function(t){var e=this,a=this,n=JSON.parse(JSON.stringify(t));n.attrs=JSON.stringify(n.attrs),n.status=5,delete n.category,void 0==n.id||this.saveAs?Object(ne["a"])(n).then((function(t){200==t.status&&(n.id=t.data,a.com.id=t.data,a.$alert("模板信息保存成功"),a.$emit("onRefresh"),e.saveAs=!1)})):Object(ne["j"])(n).then((function(t){200==t.status&&(a.$alert("模板信息更新成功"),a.$emit("onRefresh"))}))},initCategoryList:function(){var t=this;return Object(l["a"])(Object(c["a"])().mark((function e(){var a,n,r;return Object(c["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=t,e.next=3,Object(ne["i"])({page:1,pageSize:99,status:5});case 3:if(n=e.sent,200==n.status){e.next=6;break}return e.abrupt("return");case 6:a.categoryList=n.data.dataList||[],r=0;case 8:if(!(r=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(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,a){this.components[t].components[e].attrs.tableHeader.splice(a,1),this.$emit("onSetComponents",Object(o["a"])(this.components))},onSetActiveIndex:function(t){t==this.activeHeaderIndex?this.activeHeaderIndex=-1:this.activeHeaderIndex=t},getTemplateList:function(t){var e=this;return Object(l["a"])(Object(c["a"])().mark((function a(){var n,r;return Object(c["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return e,a.next=3,Object(ne["h"])({page:1,pageSize:999,category_id:t,status:5});case 3:if(n=a.sent,200==n.status){a.next=6;break}return a.abrupt("return",[]);case 6:return r=n.data.dataList.map((function(t){return t.attrs=JSON.parse(t.attrs),t})),a.abrupt("return",r);case 8:case"end":return a.stop()}}),a)})))()}}},oe=re,se=(a("1798"),Object(D["a"])(oe,Gt,Yt,!1,null,null,null)),ie=se.exports,ce=function(){var t=this,e=t.$createElement,a=t._self._c||e;return null!=t.com?a("div",{staticClass:"editor-attribute"},[a("el-form",[t._l(t.com.attrs,(function(e,n){return["TextArea"==t.com.type?["pager"!=e.type&&"constant"!=e.type&&"attr"!=e.type&&"formual"!=e.type&&"sourceData"!=e.type&&"Directory"!=e.type?[a("el-form-item",{attrs:{label:e.name+" (引用名:["+e.id+"])"}},[a("el-input",{attrs:{type:"textarea"},model:{value:e.content,callback:function(a){t.$set(e,"content",a)},expression:"sub.content"}})],1)]:t._e(),"formual"==e.type?[a("el-form-item",{attrs:{label:e.name+" (引用名:["+e.id+"])"}},[a("el-input",{attrs:{type:"textarea"},model:{value:e.formula,callback:function(a){t.$set(e,"formula",a)},expression:"sub.formula"}})],1)]:t._e(),"sourceData"==e.type?[a("el-form-item",{attrs:{label:e.name+" (引用名:["+e.id+"])"}},[t._v(" "+t._s(t.formatSourceData(e.id,e.formula))+" ")])]:t._e()]:t._e()]}))],2),a("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}}},[a("headerSetting",{attrs:{headerItemName:t.headerItemName},on:{onSetHeader:t.onSetHeader}})],1)],1):t._e()},le=[],ue={name:"attributes",components:{headerSetting:ae},directives:{elDragDialog:L["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"}}},mounted:function(){this.initCategoryList()},methods:{formatSourceData:function(t,e){var a=/\[(.*?)\]\[(.*?)\]\[(.*?)\]\[(.*?)\]/,n=new RegExp(a),r=e.match(n),o=t+"="+r[2]+"."+r[3],s=r[4];return s=r[4].split(","),o+="."+String.fromCharCode(65+parseInt(s[1]))+(parseInt(s[0])+1),o},onSaveAs:function(t){this.saveAs=!0,this.onSaveTemplate()},onChangeCategory:function(t){var e=this;e.com.category_id=t[1]},onSaveTemplate:function(t){var e=this,a=this,n=JSON.parse(JSON.stringify(t));n.attrs=JSON.stringify(n.attrs),n.status=5,delete n.category,void 0==n.id||this.saveAs?Object(ne["a"])(n).then((function(t){200==t.status&&(n.id=t.data,a.com.id=t.data,a.$alert("模板信息保存成功"),a.$emit("onRefresh"),e.saveAs=!1)})):Object(ne["j"])(n).then((function(t){200==t.status&&(a.$alert("模板信息更新成功"),a.$emit("onRefresh"))}))},initCategoryList:function(){var t=this;return Object(l["a"])(Object(c["a"])().mark((function e(){var a,n,r;return Object(c["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=t,e.next=3,Object(ne["i"])({page:1,pageSize:99,status:5});case 3:if(n=e.sent,200==n.status){e.next=6;break}return e.abrupt("return");case 6:a.categoryList=n.data.dataList||[],r=0;case 8:if(!(r=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(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,a){this.components[t].components[e].attrs.tableHeader.splice(a,1),this.$emit("onSetComponents",Object(o["a"])(this.components))},onSetActiveIndex:function(t){t==this.activeHeaderIndex?this.activeHeaderIndex=-1:this.activeHeaderIndex=t},getTemplateList:function(t){var e=this;return Object(l["a"])(Object(c["a"])().mark((function a(){var n,r;return Object(c["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return e,a.next=3,Object(ne["h"])({page:1,pageSize:999,category_id:t,status:5});case 3:if(n=a.sent,200==n.status){a.next=6;break}return a.abrupt("return",[]);case 6:return r=n.data.dataList.map((function(t){return t.attrs=JSON.parse(t.attrs),t})),a.abrupt("return",r);case 8:case"end":return a.stop()}}),a)})))()}}},de=ue,_e=(a("4d45"),Object(D["a"])(de,ce,le,!1,null,null,null)),me=_e.exports,pe=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"com-product-attr"},[a("el-tree",{attrs:{data:t.dataList,props:t.defaultProps},on:{"node-click":t.handleNodeClick}})],1)},fe=[],he=a("c4c8"),be={name:"searchParams",emits:["onInsertProductAttr"],props:{docAttr:{type:Object,default:function(){return{linkProduct:[]}}}},watch:{docAttr:{handler:function(t){void 0==t&&null==t||(this.queryForm.ids=JSON.stringify(t.linkProduct),this.search())},immediate:!0,deep:!0}},data:function(){return{defaultProps:{children:"children",label:"label"},dataList:[],queryForm:{page:1,pageSize:999,status:5,ids:""}}},mounted:function(){},methods:{onClose:function(t){var e=this;e.dialogVisible=!1,e.onBtnSearch()},handleNodeClick:function(t){t&&void 0==t.children&&this.$emit("onInsertProductAttr",t)},search:function(){var t=this;Object(he["h"])(t.queryForm).then((function(e){e&&(t.dataList=e.data.dataList.map((function(t){var e=JSON.parse(t.attrs),a=e.map((function(e){return Object(s["a"])(Object(s["a"])({label:e.name},e),{},{parent:{id:t.id,name:t.name}})}));return{label:t.name,children:a}})))}))},ChangePage:function(t){var e=this;e.queryForm.page=t,e.search()}}},ve=be,ge=(a("37c8"),Object(D["a"])(ve,pe,fe,!1,null,null,null)),je=ge.exports,ye=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"doc-attr"},[a("el-form",[a("el-form-item",{attrs:{label:"标题:"}},[a("el-input",{staticClass:"input-item",staticStyle:{width:"100%"},attrs:{placeholder:"请填写文档名称"},model:{value:t.attrs.title,callback:function(e){t.$set(t.attrs,"title",e)},expression:"attrs.title"}})],1),a("el-form-item",{attrs:{label:"选择分类:"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择所属分类"},model:{value:t.attrs.category_id,callback:function(e){t.$set(t.attrs,"category_id",e)},expression:"attrs.category_id"}},t._l(t.articleCategoryList,(function(t,e){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",{staticStyle:{width:"100%"},attrs:{multiple:!0,placeholder:"请选择适用产品"},on:{change:t.onChangeProduct},model:{value:t.attrs.linkProduct,callback:function(e){t.$set(t.attrs,"linkProduct",e)},expression:"attrs.linkProduct"}},t._l(t.productList,(function(t,e){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",{staticStyle:{width:"100%"},attrs:{multiple:!0,placeholder:"请选择适用项目"},on:{change:t.onChangeProject},model:{value:t.attrs.linkProject,callback:function(e){t.$set(t.attrs,"linkProject",e)},expression:"attrs.linkProject"}},t._l(t.projectList,(function(t,e){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1)],1)],1)},Oe=[],xe=a("24d2"),ke={name:"docAttr",props:{attrs:{type:Object,default:function(){return{category_id:"",title:"",linkProduct:[],linkProject:[]}}}},watch:{attrs:{handler:function(t){},immediate:!0,deep:!0}},data:function(){return{articleCategoryList:[],productList:[],projectList:[]}},created:function(){this.initArticleCategoryList(),this.initProjectList(),this.initGoodsList()},methods:{onChangeProduct:function(t){},onChangeProject:function(t){},initProjectList:function(){var t=this;Object(xe["h"])({page:1,pageSize:9999,status:5}).then((function(e){200==e.status&&(t.projectList=e.data.dataList)}))},initGoodsList:function(){var t=this;Object(he["h"])({page:1,pageSize:9999,status:5}).then((function(e){200==e.status&&(t.productList=e.data.dataList)}))},initArticleCategoryList:function(){var t=this;Object(p["i"])({page:1,pageSize:99,status:5}).then((function(e){200==e.status&&(t.articleCategoryList=e.data.dataList)}))}}},Ce=ke,Ee=(a("71b5"),Object(D["a"])(Ce,ye,Oe,!1,null,null,null)),we=Ee.exports,De=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.coms.length>0?a("div",{staticClass:"com-list"},[a("div",{staticClass:"com-list-title"},[t._v("模块管理")]),a("div",{staticClass:"com-items"},[a("draggable",{staticStyle:{width:"100%"},attrs:{options:{animation:200}},on:{update:t.datadragEnd},model:{value:t.coms,callback:function(e){t.coms=e},expression:"coms"}},[t._l(t.coms,(function(e,n){return[a("div",{staticClass:"com-item",attrs:{draggable:""}},[a("div",{staticClass:"icon"},[a("svg-icon",{attrs:{"icon-class":"dashBoard1"}})],1),a("div",{staticClass:"name",on:{click:function(e){return t.onSetActive(n)}}},[t._v(t._s(e.name))]),a("div",{staticClass:"remove",on:{click:function(e){return t.onRemove(n)}}},[a("svg-icon",{staticStyle:{cursor:"pointer"},attrs:{"icon-class":"delete"}})],1)])]}))],2)],1)]):t._e()},Ie=[],Pe={name:"comList",emits:["onRemove","onRebuild","onSetActive"],components:{draggable:Dt.a},props:{coms:{type:Array,default:[]}},data:function(){return{}},methods:{datadragEnd:function(t){var e=this;return Object(l["a"])(Object(c["a"])().mark((function a(){var n;return Object(c["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:t.preventDefault(),n=e.coms,e.$emit("onRebuild",n);case 3:case"end":return a.stop()}}),a)})))()},onSetActive:function(t){this.$emit("onSetActive",t)},onRemove:function(t){this.$emit("onRemove",t)}}},Le=Pe,Ae=(a("e77f"),Object(D["a"])(Le,De,Ie,!1,null,null,null)),Me=Ae.exports,Te=function(){var t=this,e=t.$createElement,a=t._self._c||e;return null!=t.coms&&t.coms.length>0&&t.size>0?a("div",{staticClass:"com-directory"},[a("el-form",{staticClass:"dirceForm"},[t._l(t.coms,(function(e){return[t._l(e.attrs,(function(n){return["Directory"==n.type?a("el-form-item",{attrs:{label:n.name+" (引用名:["+e.id+"])"}},[a("el-input",{attrs:{type:"textarea"},model:{value:n.content,callback:function(e){t.$set(n,"content",e)},expression:"item.content"}})],1):t._e()]}))]}))],2),a("div",{staticClass:"com-title"},[t._v("目录信息")]),a("div",{staticClass:"com-items"},[t._l(t.coms,(function(e,n){return[t._l(e.attrs,(function(e,n){return"Directory"==e.type?[a("div",{staticClass:"com-item"},[a("div",{staticClass:"icon"},[a("svg-icon",{attrs:{"icon-class":"directory"}})],1),a("div",{staticClass:"name"},[t._v(" "+t._s(""!=e.content?e.content:e.name)+" ")])])]:t._e()}))]}))],2)],1):t._e()},Re=[],Se={props:{coms:{type:Array,default:null}},watch:{coms:{handler:function(t){if(null!=t){this.size=0;for(var e=0;e

'.concat(this.content," ");e=e.replaceAll("",'
'),Object(p["e"])({content:e,title:this.docAttr.title}).then((function(e){if(200==e.status){var a=document.createElement("a");a.href=e.data,a.target="_blank",a.click()}else t.$alert(e.errMsg)}))}}}),Ye=Ge,Xe=(a("8fc7"),Object(D["a"])(Ye,We,Ke,!1,null,null,null)),Qe=Xe.exports,Ze={name:"create",components:{menus:kt,editor:Jt,Attribute:ie,comList:Me,docAttr:we,ViewForm:Qe,ProductAttr:je,Directory:Be,draggable:Dt.a,attributeVar:me},directives:{elDragDialog:L["a"]},data:function(){return{activeNames:"-1",nestedActiveNames:[],articleList:[],categoryList:[],coms:[],comIndex:0,showProductAttr:!1,comList:[],docAttr:{id:0,category_id:"",title:"",content:"",status:5,links:"",linkProduct:[],linkProject:[],projects:""},insertCmd:null,showViewForm:!1,isAdmin:2,tabExt:{row:0,col:0},userInfo:null,articleId:0,loading:!1,showView:0,childrenList:[],value:[],AttributeIndex:0}},watch:{coms:{handler:function(t){},immediate:!0,deep:!0},articleId:{handler:function(t){null==t||void 0==t||t<=0||this.loadArticle(t)},immediate:!0,deep:!0}},mounted:function(){var t=this;return Object(l["a"])(Object(c["a"])().mark((function e(){var a,n;return Object(c["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=t,t.searchArticle(),e.next=4,t.initCategoryList();case 4:return e.next=6,t.initCurrentUser();case 6:t.articleId=t.$route.query.articleId,n=t.$route.query.templateId,n>0&&a.loadTemplateInfo(n),a.isAdmin=a.userInfo.roleInfo.is_admin;case 10:case"end":return e.stop()}}),e)})))()},methods:{handleItemClick:function(t){var e=this;return Object(l["a"])(Object(c["a"])().mark((function a(){return Object(c["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:if("-1"!=t){a.next=2;break}return a.abrupt("return");case 2:return a.next=4,Object(ne["i"])({parent_id:t}).then((function(t){if(console.log(0==t.data.length),200==t.status||0!=t.data.length){e.childrenList=t.data;for(var a=0;a0?Object(p["j"])(e.docAttr).then((function(t){200==t.status&&(e.docAttr.id=t.data,e.$alert("文档保存成功"),e.searchArticle())})):Object(p["a"])(e.docAttr).then((function(t){200==t.status&&(e.docAttr.id=t.data,e.$alert("文档保存成功"),e.searchArticle())}))):e.$alert("请填写文档标题")},onSetComs:function(t){var e=this;e.coms=Object(o["a"])(t)},onAddLayer:function(t,e){var a=this,n=a.categoryList[t].dataList[e],r=Object(s["a"])(Object(s["a"])({},n),{},{attrs:JSON.parse(n.attrs)});delete r.category,a.coms.push(r),a.comIndex=a.coms.length-1},onInsert:function(t){var e=this;switch(t.key){case"article":e.insertArticle();break;case"table":e.insertTable();break;case"sourceData":e.insertSourceData(t);break;case"formual":e.insertFormual(t);break;case"constant":e.insertConstant(t);break;case"variable":e.insertVariable(t);break;case"pager":e.insertPager();break;case"attr":this.insertProductAttr();break;case"Directory":e.insertDirectory();break;case"addNew":e.insertNew(t);break;case"ai":e.insertAI(t);break}},insertAI:function(t){var e=this;if(e.comIndex<0)return e.$alert("请选择插入图层"),!1;var a=e.coms[e.comIndex],n={type:"ai",id:"ai"+(a.attrs.length+1),dataId:"",name:"AI",intro:"插入AI",content:t.content.result,search:t.content.searchTerm};a.attrs.push(n),console.log(a.attrs),"TextArea"==a.type&&(e.insertCmd={content:"{{"+n.id+"}}"})},insertProductAttr:function(){if(this.docAttr.linkProduct.length<=0)return this.$alert("请选择文档关联商品信息"),!1;this.showProductAttr=!0},insertDirectory:function(t){var e=this;if(e.comIndex<0)return e.$alert("请选择插入图层"),!1;console.log(t);var a=e.coms[e.comIndex],n={type:"Directory",id:"Directory"+(a.attrs.length+1),name:"目录信息",intor:"目录信息",content:""};a.attrs.push(n),e.insertCmd={content:"
{{"+n.id+"}}
"}},onInsertProductAttr:function(t){var e=this;if(this.showProductAttr=!1,e.comIndex<0)return e.$alert("请选择插入图层"),!1;var a=e.coms[e.comIndex],n={type:"ProductAttr",id:"ProductAttr"+(a.attrs.length+1),dataId:t.id,name:"商品属性",intor:"商品属性",content:"",attrs:t};a.attrs.push(n),e.insertCmd={content:"{{"+n.id+"}}"}},insertNew:function(t){var e=this;e.coms.push(t)},insertPager:function(){var t=this;if(t.comIndex<0)return t.$alert("请选择插入图层"),!1;var e=t.coms[t.comIndex],a={type:"pager",id:"pager"+(e.attrs.length+1),name:"分页符",intor:"强制分页",content:""};e.attrs.push(a),"TextArea"==e.type&&(t.insertCmd={content:"
{{"+a.id+"}}
"})},insertArticle:function(){var t=this;t.coms.push({type:"TextArea",lay_id:"textArea",code:"模块名",name:"图文",intro:"图文介绍",isEdit:2,content:"请填写内容",attrs:[]}),t.comIndex=t.coms.length-1},insertTable:function(){var t=this;t.coms.push({type:"Table",lay_id:"Table",code:"模块名",name:"图表名称",intro:"图表介绍",isEdit:2,tableHeader:this.initTableHeader(),tableData:[{}],htmlData:"",attrs:[]}),t.comIndex=t.coms.length-1},initTableHeader:function(){for(var t=65,e=[],a=t;a<=t+25;a++)e.push(String.fromCharCode(a));return e},insertConstant:function(t){var e=this;if(e.comIndex<0)return e.$alert("请选择插入图层"),!1;var a=e.coms[e.comIndex],n={type:"constant",id:t.content.code+(a.attrs.length+1),dataId:t.id,name:t.content.code,intro:t.content.intro,content:t.content.value,data:t.content};a.attrs.push(n),"TextArea"==a.type?e.insertCmd={content:"{{"+n.id+"}}"}:e.comIndex>=0&&e.setTableData(n.id)},insertVariable:function(t){var e=this;if(e.comIndex<0)return e.$alert("请选择插入图层"),!1;var a=e.coms[e.comIndex],n={type:"variable",id:t.content.code+(a.attrs.length+1),dataId:t.id,name:t.content.code,intro:t.content.intro,content:t.content.value,data:t.content};a.attrs.push(n),"TextArea"==a.type?e.insertCmd={content:"{{"+n.id+"}}"}:e.comIndex>=0&&e.setTableData(n.id)},insertSourceData:function(t){var e=this;if(e.comIndex<0)return e.$alert("请选择插入图层"),!1;var a=e.coms[e.comIndex],n={type:"sourceData",id:"sourceData"+(a.attrs.length+1),dataId:"",name:"源数据",intro:"插入源数据",formula:"[R]["+t.content.tb+"]["+t.content.sheet+"]["+t.content.r+","+t.content.c+"]",content:t.content.value,data:t.content};a.attrs.push(n),"TextArea"==a.type&&(e.insertCmd={content:"{{"+n.id+"}}"})},insertFormual:function(t){var e=this;if(e.comIndex<0)return e.$alert("请选择插入图层"),!1;var a=e.coms[e.comIndex],n={type:"formual",id:"formual"+(a.attrs.length+1),dataId:t.id,name:t.content.name,intro:t.content.intro,formula:t.content.formula,content:0,data:t.content};a.attrs.push(n),"TextArea"==a.type?e.insertCmd={content:"{{"+n.id+"}}"}:e.comIndex},initCategoryList:function(){var t=this;return Object(l["a"])(Object(c["a"])().mark((function e(){var a,n,r;return Object(c["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=t,e.next=3,Object(ne["i"])({page:1,pageSize:99,parent_id:0,status:5});case 3:if(n=e.sent,200==n.status){e.next=6;break}return e.abrupt("return");case 6:a.categoryList=n.data.dataList,r=0;case 8:if(!(r=0&&(this.$emit("onUpdateAttr",this.currentIndex,this.com.attrs.length-1,e),this.$refs.editor.instance.execCommand("delete")),this.$refs.editor.instance.insertHtml(t.content)}},immediate:!0,deep:!0}},data:function(){return{editorUrl:"/ckeditor/ckeditor.js",editorConfig:{language:"zh-cn",height:"800px"},content:"",editor:null}},mounted:function(){},methods:{replaceData:function replaceData(data){var _this2=this;return Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__["a"])(Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["a"])().mark((function _callee(){var _this,i,attrId,item,dataItem,selectHtml,l,_item,prodAttrId,_dataItem,_selectHtml,formual,result;return Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["a"])().wrap((function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_this=_this2,i=0;case 2:if(!(i<_this.com.attrs.length)){_context.next=37;break}if(attrId=_this.com.attrs[i].id,"variable"!=_this.com.attrs[i].type){_context.next=9;break}if(item=_this.com.attrs[i],2==item.data.value_type){for(dataItem=item.data.value_item.split(","),selectHtml='",data=data.replace("{{"+item.id+"}}",selectHtml)}else data=data.replace("{{"+attrId+"}}",'');_context.next=34;break;case 9:if("ProductAttr"!=_this.com.attrs[i].type){_context.next=16;break}if(_item=_this.com.attrs[i],prodAttrId=_item.id+"_"+i,""==_item.content&&(_item.content=_item.attrs.value),1==_item.attrs.type)data=data.replace("{{"+_item.id+"}}",'');else{for(_dataItem=_item.attrs.valueItems.split(","),_selectHtml='",data=data.replace("{{"+_item.id+"}}",_selectHtml)}_context.next=34;break;case 16:if("formual"!=_this.com.attrs[i].type){_context.next=26;break}return _context.next=19,_this.analysisFormual(_this.com.attrs[i]);case 19:return formual=_context.sent,_context.next=22,_this.getRemote(formual);case 22:formual=_context.sent,data=data.replace("{{"+attrId+"}}",eval(formual)),_context.next=34;break;case 26:if("sourceData"!=_this.com.attrs[i].type){_context.next=33;break}return _context.next=29,_this.getRemote1(_this.com.attrs[i].formula);case 29:result=_context.sent,data=data.replace("{{"+attrId+"}}",result),_context.next=34;break;case 33:"Directory"==_this.com.attrs[i].type?(data=data.replace("

{{"+attrId+"}}

","

"+_this.com.attrs[i].content+"

"),data=data.replace("
{{"+attrId+"}}
","

"+_this.com.attrs[i].content+"

"),data=data.replace("{{"+attrId+"}}","

"+_this.com.attrs[i].content+"

")):data=data.replace("{{"+attrId+"}}",_this.com.attrs[i].content);case 34:i++,_context.next=2;break;case 37:return _context.abrupt("return",data);case 38:case"end":return _context.stop()}}),_callee)})))()},bindEvents:function(){for(var t=this,e=0;e0)){n.next=6;break}if(s=o[0].attrs.filter((function(t){return t.name==e})),!(s.length>0)){n.next=6;break}return n.abrupt("return",parseFloat(s[0].content));case 6:return n.abrupt("return",0);case 7:case"end":return n.stop()}}),n)})))()},handleChangeProduct:function(t){var e=t.target.dataset.index;this.$emit("onUpdateProdAttr",this.currentIndex,e,t.target.value)},handleInputProduct:function(t){var e=t.target.dataset.index;this.$emit("onUpdateProdAttr",this.currentIndex,e,t.target.value)},handleInput:function(t){var e=t.target.dataset.index;this.$emit("onUpdateAttr",this.currentIndex,e,t.target.value)},onEditorReady:function(t){},onInputText:function(t){this.$emit("onUpdate",this.currentIndex,t)},onFocus:function(t){},onBlur:function(t){}}}},a2d4:function(module,__webpack_exports__,__webpack_require__){"use strict";var C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("c7eb"),C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("1da1"),core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("4de4"),core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_2__),core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("b0c0"),core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_3__),core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("a9e3"),core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_4__),core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("d3b7"),core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__),core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("4d63"),core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_6__),core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("ac1f"),core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_7__),core_js_modules_es_regexp_sticky_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("2c3e"),core_js_modules_es_regexp_sticky_js__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(core_js_modules_es_regexp_sticky_js__WEBPACK_IMPORTED_MODULE_8__),core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("25f0"),core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_9__),core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("466d"),core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_10__),core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("5319"),core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_11__),_api_sourceData__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("1c4c");__webpack_exports__["a"]={name:"app",emits:["onUpdateData"],compnents:{},props:{coms:{type:Array,default:function(){return[]}},currentIndex:{type:Number,default:0},com:{type:Object,default:null}},watch:{com:{handler:function(t){var e=this,a=this;null!=t&&void 0!=t.content&&null!=t.content&&a.replaceData(t.content).then((function(t){a.content=t,a.$emit("onUpdateData",e.currentIndex,t)}))},immediate:!0,deep:!0}},data:function(){return{content:""}},methods:{replaceData:function replaceData(data){var _this3=this;return Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__["a"])(Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["a"])().mark((function _callee(){var _this,i,attrId,formula,result;return Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["a"])().wrap((function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_this=_this3,i=0;case 2:if(!(i<_this.com.attrs.length)){_context.next=25;break}if(attrId=_this.com.attrs[i].id,"formula"!=_this.com.attrs[i].type){_context.next=14;break}return _context.next=7,_this.analysisformula(_this.com.attrs[i]);case 7:return formula=_context.sent,_context.next=10,_this.getRemote(formula);case 10:formula=_context.sent,data=data.replace("{{"+attrId+"}}",eval(formula)),_context.next=22;break;case 14:if("sourceData"!=_this.com.attrs[i].type){_context.next=21;break}return _context.next=17,_this.getRemote1(_this.com.attrs[i].formula);case 17:result=_context.sent,data=data.replace("{{"+attrId+"}}",result),_context.next=22;break;case 21:"Directory"==_this.com.attrs[i].type?(data=data.replace("

{{"+attrId+"}}

","

"+_this.com.attrs[i].content+"

"),data=data.replace("
{{"+attrId+"}}
","

"+_this.com.attrs[i].content+"

"),data=data.replace("{{"+attrId+"}}","

"+_this.com.attrs[i].content+"

")):data=data.replace("{{"+attrId+"}}",_this.com.attrs[i].content);case 22:i++,_context.next=2;break;case 25:return _context.abrupt("return",data);case 26:case"end":return _context.stop()}}),_callee)})))()},analysisformula:function(t){var e=this;return Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__["a"])(Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["a"])().mark((function a(){var n,r,o,s,i,c,l;return Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:n=e,r=/(\[.*?\]){3}/,o=t.formula,s=new RegExp(r);case 4:if(i=o.match(s),null!=i){a.next=8;break}return a.abrupt("break",18);case 8:return c=i[0],a.next=11,n.getformulaData(c);case 11:return l=a.sent,a.next=14,n.getRemote(l);case 14:l=a.sent,o=o.replace(c,"("+parseFloat(l)+")"),a.next=4;break;case 18:return a.abrupt("return",o);case 19:case"end":return a.stop()}}),a)})))()},getformulaData:function(t){var e=this;return Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__["a"])(Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["a"])().mark((function a(){var n,r,o,s,i;return Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(n=e,r=/\[(.*?)\]\[(.*?)\]\[(.*?)\]/,o=new RegExp(r),s=t.match(o),i=0,"T"!=s[1]){a.next=9;break}return a.next=8,n.getModuleData(s[2],s[3]);case 8:i=a.sent;case 9:return a.abrupt("return",i);case 10:case"end":return a.stop()}}),a)})))()},getRemote:function(t){var e=this;return Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__["a"])(Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["a"])().mark((function a(){var n,r,o,s,i,c,l;return Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:n=e,r=/\[(.*?)\]\[(.*?)\]\[(.*?)\]\[(.*?)\]/,o=new RegExp(r);case 3:if(s=t.match(o),null!=s){a.next=7;break}return a.abrupt("break",17);case 7:if("R"!=s[1]){a.next=15;break}return i=s[4],i=s[4].split(","),a.next=12,n.getRemoteData(s[2],s[3],i[0],i[1]);case 12:c=a.sent,l=s[0],t=t.replace(l,"("+parseFloat(c)+")");case 15:a.next=3;break;case 17:return a.abrupt("return",t);case 18:case"end":return a.stop()}}),a)})))()},getRemote1:function(t){var e=this;return Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__["a"])(Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["a"])().mark((function a(){var n,r,o,s,i,c,l;return Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:n=e,r=/\[(.*?)\]\[(.*?)\]\[(.*?)\]\[(.*?)\]/,o=new RegExp(r);case 3:if(s=t.match(o),null!=s){a.next=7;break}return a.abrupt("break",17);case 7:if("R"!=s[1]){a.next=15;break}return i=s[4],i=s[4].split(","),a.next=12,n.getRemoteData(s[2],s[3],i[0],i[1]);case 12:c=a.sent,l=s[0],t=t.replace(l,parseFloat(c));case 15:a.next=3;break;case 17:return a.abrupt("return",t);case 18:case"end":return a.stop()}}),a)})))()},getRemoteData:function(t,e,a,n){var r=this;return Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__["a"])(Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["a"])().mark((function o(){var s,i;return Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["a"])().wrap((function(o){while(1)switch(o.prev=o.next){case 0:return r,0,s={code:t,sheetName:e,row:a,col:n},o.next=5,Object(_api_sourceData__WEBPACK_IMPORTED_MODULE_12__["e"])(s);case 5:if(i=o.sent,200!=i.status){o.next=9;break}return console.log("result:",i.data),o.abrupt("return",i.data.result);case 9:return o.abrupt("return",0);case 10:case"end":return o.stop()}}),o)})))()},getModuleData:function(t,e){var a=this;return Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__["a"])(Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["a"])().mark((function n(){var r,o,s;return Object(C_Users_0_Desktop_fronted_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(r=a,o=r.coms.filter((function(e){return e.code==t})),!(o.length>0)){n.next=6;break}if(s=o[0].attrs.filter((function(t){return t.name==e})),!(s.length>0)){n.next=6;break}return n.abrupt("return",parseFloat(s[0].content));case 6:return n.abrupt("return",0);case 7:case"end":return n.stop()}}),n)})))()}}}},a399:function(t,e,a){"use strict";a("d4f2")},a3cf:function(t,e,a){"use strict";a("cd42")},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,s=t.clientY-n.offsetTop,i=r.offsetWidth,c=r.offsetHeight,l=document.body.clientWidth,u=document.body.clientHeight,d=r.offsetLeft,_=l-r.offsetLeft-i,m=r.offsetTop,p=u-r.offsetTop-c,f=o(r,"left"),h=o(r,"top");f.includes("%")?(f=+document.body.clientWidth*(+f.replace(/\%/g,"")/100),h=+document.body.clientHeight*(+h.replace(/\%/g,"")/100)):(f=+f.replace(/\px/g,""),h=+h.replace(/\px/g,"")),document.onmousemove=function(t){var n=t.clientX-e,o=t.clientY-s;-n>d?n=-d:n>_&&(n=_),-o>m?o=-m:o>p&&(o=p),r.style.cssText+=";left:".concat(n+f,"px;top:").concat(o+h,"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},b28f:function(t,e,a){},b486:function(t,e,a){},bae7:function(t,e,a){},c4c8:function(t,e,a){"use strict";a.d(e,"i",(function(){return r})),a.d(e,"b",(function(){return o})),a.d(e,"k",(function(){return s})),a.d(e,"e",(function(){return i})),a.d(e,"d",(function(){return c})),a.d(e,"g",(function(){return l})),a.d(e,"h",(function(){return u})),a.d(e,"a",(function(){return d})),a.d(e,"j",(function(){return _})),a.d(e,"f",(function(){return m})),a.d(e,"c",(function(){return p}));var n=a("b775");function r(t){return Object(n["a"])({url:"/product/category/search",method:"post",data:t})}function o(t){return Object(n["a"])({url:"/product/category/create",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/product/category/update",method:"post",data:t})}function i(t){return Object(n["a"])({url:"/product/category/info",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/product/category/delete",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/product/category/all",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/product/search",method:"post",data:t})}function d(t){return Object(n["a"])({url:"/product/create",method:"post",data:t})}function _(t){return Object(n["a"])({url:"/product/update",method:"post",data:t})}function m(t){return Object(n["a"])({url:"/product/info",method:"post",data:t})}function p(t){return Object(n["a"])({url:"/product/delete",method:"post",data:t})}},c621:function(t,e,a){"use strict";a.d(e,"i",(function(){return r})),a.d(e,"e",(function(){return o})),a.d(e,"b",(function(){return s})),a.d(e,"k",(function(){return i})),a.d(e,"f",(function(){return c})),a.d(e,"d",(function(){return l})),a.d(e,"h",(function(){return u})),a.d(e,"g",(function(){return d})),a.d(e,"c",(function(){return _})),a.d(e,"a",(function(){return m})),a.d(e,"j",(function(){return p}));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 s(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 c(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 u(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 _(t){return Object(n["a"])({url:"/template/delete",method:"post",data:t})}function m(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})}},c9e6:function(t,e){},cd42:function(t,e,a){},d4f2:function(t,e,a){},d59f:function(t,e,a){},e09e:function(t,e,a){},e77f:function(t,e,a){"use strict";a("4161")},ecbf:function(t,e,a){"use strict";a("37b1")},f09a:function(t,e,a){"use strict";a("03d4")},f3c2:function(t,e,a){"use strict";a.d(e,"a",(function(){return n})),a.d(e,"b",(function(){return r}));var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"com-empty"})},r=[]},f48c:function(t,e,a){},f746:function(t,e,a){"use strict";var n=a("c9e6"),r=a.n(n);e["default"]=r.a},f841:function(t,e,a){"use strict";a("e09e")},ffaf:function(t,e,a){"use strict";a("4ba9e")},fff4:function(t,e,a){}}]);