chunk-195db380.0b3ff82f.js 111 KB

1
  1. (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;a<n;a++)e.call(null,t[a],a,t);else for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.call(null,t[r],r,t)}},{key:"isArray",value:function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{key:"getObjClass",value:function(t){return Object.prototype.toString.call(t).slice(8,-1)}},{key:"deepClone",value:function(t){var e,a=this.getObjClass(t);if("Object"===a)e={};else{if("Array"!==a)return t;e=[]}for(var n in t){var r=t[n];e[n]=this.deepClone(r)}return e}},{key:"assiginObj",value:function(t,e){var a=t;if("object"!=Object(u["a"])(t)||"object"!=Object(u["a"])(e)||Object(u["a"])(t))return e;for(var n in e)t.hasOwnProperty(n)?a[n]=this.assiginObj(t[n],e[n]):a[n]=e[n];return a}}])}()),p=(new m,a("424e")),f=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"com-menus"},[a("div",{staticClass:"menus-out"},t._l(t.menus,(function(e,n){return a("div",{key:n,staticClass:"group-item",class:"group-item"+n},[a("div",{staticClass:"items-name"},[t._v(t._s(e.name))]),a("div",{staticClass:"menus"},[t._l(e.subMenus,(function(e,n){return[a("div",{staticClass:"menu",on:{click:function(a){return t.onClickMenus(e)}}},[a("div",{staticClass:"icon"},[""!=e.icon?a("svg-icon",{attrs:{className:"svg-style",size:"120","icon-class":e.icon}}):t._e()],1),a("div",{staticClass:"menu-name"},[t._v(t._s(e.name))])])]}))],2)])})),0),a("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{visible:t.showFormula,"append-to-body":"",width:"300","custom-class":"prod-verify",title:"选择公式"},on:{"update:visible":function(e){t.showFormula=e}}},[a("Formula",{on:{onPicked:t.onPickedFormula}})],1),a("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{visible:t.showVariable,"append-to-body":"",width:"800px","custom-class":"prod-verify",title:t.insertTitle},on:{"update:visible":function(e){t.showVariable=e}}},[a("Variable",{attrs:{type:t.type},on:{onPicked:t.onPickedVariable,onData:t.btnbianl}})],1),a("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{visible:t.showSourceData,"append-to-body":"",width:"300","custom-class":"prod-verify",title:"选择源数据"},on:{"update:visible":function(e){t.showSourceData=e}}},[a("sourceData",{on:{onPicked:t.onPickedTab}})],1),a("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{visible:t.showSourceAi,"append-to-body":"",width:"300","custom-class":"prod-verify",title:"选择AI"},on:{"update:visible":function(e){t.showSourceAi=e}}},[a("sourceAi",{on:{onPicked:t.onPickedAi}})],1),a("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{visible:t.showSourceEs,"append-to-body":"",width:"300","custom-class":"prod-verify",title:"AI随笔"},on:{"update:visible":function(e){t.showSourceEs=e}}},[a("sourceEs",{on:{onPicked:t.onPickedAi}})],1)],1)},h=[],b=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"com-formual"},[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),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:"name",label:"名称",align:"left",width:"180"}}),a("el-table-column",{attrs:{prop:"intro",label:"介绍",align:"center",width:"150"}}),a("el-table-column",{attrs:{prop:"formula",label:"内容",align:"center","min-width":"150"}}),a("el-table-column",{attrs:{label:"操作",align:"center",width:"350"},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),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),a("el-button",{attrs:{type:"danger",size:"mini"}},[a("svg-icon",{attrs:{"icon-class":"delete"}}),t._v("删除")],1)],1)]}}])})],1),a("div",{staticClass:"page-info"},[a("el-pagination",{attrs:{"page-size":t.queryForm.pageSize,total:t.recordCount,"page-count":t.pageTotal,background:"",layout:"prev, pager, next"},on:{"current-change":t.ChangePage},model:{value:t.queryForm.page,callback:function(e){t.$set(t.queryForm,"page",e)},expression:"queryForm.page"}})],1),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},on:{onClose:t.onClose}})],1)],1)},v=[],g=a("b775");function j(t){return Object(g["a"])({url:"/formula/search",method:"post",data:t})}function y(t){return Object(g["a"])({url:"/formula/create",method:"post",data:t})}function O(t){return Object(g["a"])({url:"/formula/update",method:"post",data:t})}function x(t){return Object(g["a"])({url:"/formula/info",method:"post",data:t})}var k=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.name,callback:function(e){t.$set(t.dataForm,"name",e)},expression:"dataForm.name"}})],1),a("el-form-item",{attrs:{label:"公式:"}},[a("el-input",{attrs:{type:"textarea"},model:{value:t.dataForm.formula,callback:function(e){t.$set(t.dataForm,"formula",e)},expression:"dataForm.formula"}}),a("div",{staticClass:"intro"},[t._v(" 公式说明: "),a("div",[t._v("格式一:[T][模块引用名][属性引用名] "),a("span",[t._v("*")]),t._v("其中 [T]表示的是模块引用。")]),a("div",[t._v("格式二:[R][表名][Sheet名称][row,col] "),a("span",[t._v("*")]),t._v("其中 [R]表示引用的是原始数据。 其中row,col表示excel表中的行、列序号")]),a("div",[t._v("目前仅支持+、-、*、/ 四种计算符合")]),a("div",[t._v("示例 [T][模块01][attr01]+[T][模块01][attr02]")])])],1),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)},C=[],E=(a("a9e3"),{emits:["onClose"],props:{id:{type:Number,default:0}},watch:{id:{handler:function(t){var e=this;null!=t&&(0!=t?e.getInfo(t):this.dataForm={id:0,name:"",formula:"",intro:"",status:"",use_status:5,params:"[]"})},immediate:!0,deep:!0}},data:function(){return{activeName:"base",currentCategory:[],allCategories:[],dataForm:{id:0,name:"",formula:"",intro:"",status:"",use_status:5,params:"[]"},statusOptions:[{value:"",label:"请选择状态"},{value:5,label:"使用中"},{value:6,label:"已停用"}]}},mounted:function(){},methods:{btnSave:function(t){var e=this;e.dataForm.id>0?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;o<this.comList.length;o++)for(var s=0;s<this.comList[o].attrs.length;s++)"ProductAttr"==this.comList[o].attrs[s].type&&this.comList[o].attrs[s].attrs.name==n&&this.comList[o].attrs[s].attrs.type==r&&(this.comList[o].attrs[s].content=a);this.$emit("onRebuild",this.comList)},onUpdateAttr:function(t,e,a){this.comList[t].attrs[e].content=a;for(var n=this.comList[t].attrs[e].type,r=this.comList[t].attrs[e].data,o=0;o<this.comList.length;o++)for(var s=0;s<this.comList[o].attrs.length;s++)this.comList[o].attrs[s].type==n&&this.comList[o].attrs[s].id==r&&(this.comList[o].attrs[s].content=a);this.$emit("onRebuild",this.comList)},onRemove:function(t){this.$emit("onDelete",t)},onEdit:function(t,e){this.comList=this.comList.map((function(t){return t.isEdit=2,t})),1==e&&(this.comList[t].isEdit=1,this.onSetActive(t)),this.$emit("onRebuild",this.comList)},onAdd:function(t){t.preventDefault(),t.stopPropagation(),this.$emit("onRebuild",this.comList)},onDragEnd:function(t){t.preventDefault(),t.stopPropagation(),this.$emit("onRebuild",this.comList)},onUpdate:function(t,e){this.coms[t].content=e},onSetActive:function(t){this.$emit("onSetActiveIndex",t)}}},Ht=zt,Vt=(a("a399"),Object(D["a"])(Ht,Ct,Et,!1,null,null,null)),Jt=Vt.exports,Gt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return null!=t.com?a("div",{staticClass:"editor-attribute"},[a("el-form",[a("el-form-item",{attrs:{label:"模块分类:"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择模块分类",size:"large"},model:{value:t.com.category_id,callback:function(e){t.$set(t.com,"category_id",e)},expression:"com.category_id"}},t._l(t.categoryList,(function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),a("el-form-item",{attrs:{label:"模块引用名:"}},[a("el-input",{staticClass:"input-item",attrs:{placeholder:"请填写模块引用名"},model:{value:t.com.code,callback:function(e){t.$set(t.com,"code",e)},expression:"com.code"}})],1),a("el-form-item",{attrs:{label:"模块名称:"}},[a("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),a("el-form-item",{attrs:{label:"模块描述:"}},[a("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),a("el-form-item",[a("div",{staticClass:"btn-save"},[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.onSaveTemplate(t.com)}}},[t._v("保存模块")]),t.com.id>0?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<a.categoryList.length)){e.next=15;break}return e.next=11,a.getTemplateList(a.categoryList[r].id);case 11:a.categoryList[r].dataList=e.sent;case 12:r++,e.next=8;break;case 15:case"end":return e.stop()}}),e)})))()},onModify:function(t,e,a){this.currentIndex=t,this.componentIndex=e,this.activeHeaderIndex=a,this.headerItemName=this.components[t].components[e].attrs.tableHeader[a],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(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<a.categoryList.length)){e.next=15;break}return e.next=11,a.getTemplateList(a.categoryList[r].id);case 11:a.categoryList[r].dataList=e.sent;case 12:r++,e.next=8;break;case 15:case"end":return e.stop()}}),e)})))()},onModify:function(t,e,a){this.currentIndex=t,this.componentIndex=e,this.activeHeaderIndex=a,this.headerItemName=this.components[t].components[e].attrs.tableHeader[a],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(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<t.length;e++)for(var a=0;a<t[e].attrs.length;a++)"Directory"==t[e].attrs[a].type&&this.size++}},immediate:!0,deep:!0}},data:function(){return{size:0}}},Ue=Se,Fe=(a("f841"),Object(D["a"])(Ue,Te,Re,!1,null,null,null)),Be=Fe.exports,$e=a("4ec3"),We=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"com-viewer"},[a("div",{staticClass:"content"},[t._l(t.coms,(function(e,n){return[a(e.type,{key:n,tag:"component",attrs:{com:e,coms:t.comList,currentIndex:n,isActive:!1},on:{onUpdateData:t.onUpdateData}})]}))],2),a("div",{staticClass:"export"},[a("el-button",{attrs:{type:"primary"},on:{click:t.onExport}},[t._v("导出")])],1)])},Ke=[],Ne=(a("ad9d"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"template-textarea"},[a("div",{staticClass:"rich-editor",domProps:{innerHTML:t._s(t.content)}})])}),qe=[],ze=a("a2d4"),He=ze["a"],Ve=(a("ffaf"),Object(D["a"])(He,Ne,qe,!1,null,null,null)),Je=Ve.exports,Ge=(a("4f15"),a("21a6"),a("8baf"),a("c5158"),{name:"Viewer",components:{TextArea:Je},props:{id:{type:Number,default:0},coms:{type:Array,default:null},docAttr:{type:Object,default:function(){return{title:""}}}},watch:{coms:{handler:function(t){null!=t&&(this.comList=JSON.parse(JSON.stringify(t)),console.log("comList",this.comList))},immediate:!0,deep:!0}},data:function(){return{comList:[],content:""}},methods:{onUpdateData:function(t,e){this.comList[t].content=e,console.log("comList1",this.comList),this.rebuildContent()},rebuildContent:function(){},onExport:function(){var t=this,e='<!DOCTYPE html><html><head><meta charset="UTF-8"></head><body><p class="header1"></p> '.concat(this.content," </body></html>");e=e.replaceAll("<table ",'<table style="border-collapse: collapse;" ').replaceAll("<td>",'<td style="border: 1px solid black;">'),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;a<e.childrenList.length;a++)e.childrenList[a].dataList=e.getTemplateList(e.childrenList[a].id)}}));case 4:case"end":return a.stop()}}),a)})))()},viewDocument:function(){this.showView=0},viewModule:function(){this.showView=1},uptadeVariable:function(t){var e,a=Object(i["a"])(this.coms);try{for(a.s();!(e=a.n()).done;){var n,r=e.value,o=Object(i["a"])(r.attrs);try{for(o.s();!(n=o.n()).done;){var s=n.value;"variable"===s.type&&s.data.id==t.id&&(s.content=t.value)}}catch(c){o.e(c)}finally{o.f()}}}catch(c){a.e(c)}finally{a.f()}},uptadeSearch:function(){var t=this;return Object(l["a"])(Object(c["a"])().mark((function e(){var a,n,r,o,s,l;return Object(c["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:a=Object(i["a"])(t.coms),e.prev=1,a.s();case 3:if((n=a.n()).done){e.next=25;break}r=n.value,o=Object(i["a"])(r.attrs),e.prev=6,o.s();case 8:if((s=o.n()).done){e.next=15;break}if(l=s.value,"ai"!==l.type){e.next=13;break}return e.next=13,t.retrieval(l);case 13:e.next=8;break;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e["catch"](6),o.e(e.t0);case 20:return e.prev=20,o.f(),e.finish(20);case 23:e.next=3;break;case 25:e.next=30;break;case 27:e.prev=27,e.t1=e["catch"](1),a.e(e.t1);case 30:return e.prev=30,a.f(),e.finish(30);case 33:case"end":return e.stop()}}),e,null,[[1,27,30,33],[6,17,20,23]])})))()},retrieval: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.loading=!0,a.prev=1,a.next=4,V.a.post("http://58.246.234.210:7860/api/v1/run/3f84a841-cefd-44b3-9555-568cc3b6c2d2?stream=false",{input_value:t.search,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 4:n=a.sent,200===n.status&&(r=n.data.outputs[0].outputs[0].results.message.data.text,t.content=r),a.next=12;break;case 8:a.prev=8,a.t0=a["catch"](1),console.error("Error during retrieval:",a.t0),e.$message.error("检索失败,请稍后重试");case 12:return a.prev=12,e.loading=!1,a.finish(12);case 15:case"end":return a.stop()}}),a,null,[[1,8,12,15]])})))()},loadTemplateInfo:function(t){var e=this,a={id:t};Object(ne["g"])(a).then((function(t){200==t.status&&(t.data.attrs=JSON.parse(t.data.attrs),e.coms=[t.data])}))},onExport:function(t){var e=this;e.comIndex=-1;e.$refs.tabHtml.innerHTML},onOpenView:function(t){this.showViewForm=!0},onClose:function(){window.close()},loadArticle:function(t){var e=this;Object(p["g"])({id:t}).then((function(t){200==t.status&&e.onLoadArticle(t.data)}))},handleDragStart:function(t){var e={};if("article"==t.target.dataset.type){var a=t.target.dataset.index;e={optType:t.target.dataset.type,item:this.articleList[a]}}else{var n=t.target.dataset.index,r=t.target.dataset.subIndex,o=this.categoryList[n].dataList[r];delete o.category,e=Object(s["a"])(Object(s["a"])({},o),{},{optType:t.target.dataset.type,key:"addNew",attrs:JSON.parse(o.attrs)})}t.dataTransfer.setData("item",JSON.stringify(e)),this.operation="drag"},onRebuild:function(t){var e=this;e.coms=Object(o["a"])(t)},initCurrentUser: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,e.next=3,Object($e["a"])();case 3:if(n=e.sent,200==n.status){e.next=6;break}return e.abrupt("return");case 6:a.userInfo=n.data;case 7:case"end":return e.stop()}}),e)})))()},onLoadArticle:function(t){var e=this;e.docAttr={id:t.id,category_id:1*t.category_id,title:t.title,content:"",status:t.status,linkProduct:t.linkProduct,links:t.links,linkProject:t.linkProject,projects:t.projects},e.coms=JSON.parse(t.data),this.uptadeSearch()},onRemove:function(t){this.coms.splice(t,1)},onSetActiveIndex:function(t){this.comIndex=t,9999!=this.comIndex&&9998!=this.comIndex&&9997!=this.comIndex||(this.AttributeIndex=0)},onAttributeIndex:function(t){this.AttributeIndex=t,9999!=this.comIndex&&9998!=this.comIndex&&9997!=this.comIndex||(this.comIndex=0)},onSaveAs:function(t){var e=this;e.docAttr.id="",e.onSave(t)},onSave:function(t){var e=this;e.coms.length<=0?e.$alert("增加组件"):""==e.docAttr.category_id||e.docAttr.category_id<=0?e.$alert("请选择文档分类"):""!=e.docAttr.title?(e.docAttr.links=JSON.stringify(e.docAttr.linkProduct),e.docAttr.projects=JSON.stringify(e.docAttr.linkProject),e.docAttr.data=JSON.stringify(e.coms),e.docAttr.id>0?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:"<div>{{"+n.id+"}}</div>"}},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:"<div>{{"+a.id+"}}</div>"})},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<a.categoryList.length)){e.next=15;break}return e.next=11,a.getTemplateList(a.categoryList[r].id);case 11:a.categoryList[r].dataList=e.sent;case 12:r++,e.next=8;break;case 15:case"end":return e.stop()}}),e)})))()},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)})))()},searchArticle:function(){var t=this;Object(p["h"])({page:1,pageSize:10}).then((function(e){200==e.status&&(t.articleList=e.data.dataList)}))}}},ta=Ze,ea=(a("ecbf"),Object(D["a"])(ta,n,r,!1,null,null,null));e["default"]=ea.exports},"33b9":function(t,e,a){},"37b1":function(t,e,a){},"37c8":function(t,e,a){"use strict";a("7cfb")},"37de":function(t,e,a){"use strict";var n=a("f3c2"),r=a("f746"),o=(a("203e"),a("2877")),s=Object(o["a"])(r["default"],n["a"],n["b"],!1,null,null,null);e["default"]=s.exports},"3e40":function(t,e,a){"use strict";a("b486")},4:function(t,e){},4161:function(t,e,a){},"424e":function(t,e,a){"use strict";a.d(e,"h",(function(){return r})),a.d(e,"e",(function(){return o})),a.d(e,"j",(function(){return s})),a.d(e,"a",(function(){return i})),a.d(e,"g",(function(){return c})),a.d(e,"c",(function(){return l})),a.d(e,"i",(function(){return u})),a.d(e,"b",(function(){return d})),a.d(e,"k",(function(){return _})),a.d(e,"f",(function(){return m})),a.d(e,"d",(function(){return p}));var n=a("b775");function r(t){return Object(n["a"])({url:"/document/search",method:"post",data:t})}function o(t){return Object(n["a"])({url:"/document/export",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/document/update",method:"post",data:t})}function i(t){return Object(n["a"])({url:"/document/create",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/document/info",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/document/delete",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/document/category/search",method:"post",data:t})}function d(t){return Object(n["a"])({url:"/document/category/create",method:"post",data:t})}function _(t){return Object(n["a"])({url:"/document/category/update",method:"post",data:t})}function m(t){return Object(n["a"])({url:"/document/category/info",method:"post",data:t})}function p(t){return Object(n["a"])({url:"/document/category/delete",method:"post",data:t})}},"42e7":function(t,e,a){},4678:function(t,e,a){var n={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c5","./az.js":"485c5","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn-bd":"9686","./bn-bd.js":"9686","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d7167","./ca.js":"d7167","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-in":"ec2e","./en-in.js":"ec2e","./en-nz":"6f50","./en-nz.js":"6f50","./en-sg":"b7e9","./en-sg.js":"b7e9","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-mx":"b5b7","./es-mx.js":"b5b7","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df48","./fa.js":"8df48","./fi":"81e9","./fi.js":"81e9","./fil":"d69a","./fil.js":"d69a","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b46","./gd.js":"f6b46","./gl":"8840","./gl.js":"8840","./gom-deva":"aaf2","./gom-deva.js":"aaf2","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540a","./jv.js":"b540a","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./oc-lnc":"167b","./oc-lnc.js":"167b","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e9","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e9","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tk":"5aff","./tk.js":"5aff","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-mo":"3a6c","./zh-mo.js":"3a6c","./zh-tw":"90ea","./zh-tw.js":"90ea"};function r(t){var e=o(t);return a(e)}function o(t){if(!a.o(n,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return n[t]}r.keys=function(){return Object.keys(n)},r.resolve=o,t.exports=r,r.id="4678"},"4ba9e":function(t,e,a){},"4d45":function(t,e,a){"use strict";a("9f93")},5:function(t,e){},6:function(t,e){},"61a8":function(t,e,a){},"6ae4":function(t,e,a){"use strict";a("b28f")},7:function(t,e){},"71b5":function(t,e,a){"use strict";a("101d")},"7cfb":function(t,e,a){},"7e4c":function(t,e,a){"use strict";a("33b9")},8:function(t,e){},"8fc7":function(t,e,a){"use strict";a("bae7")},9:function(t,e){},"924b":function(t,e,a){"use strict";a("42e7")},"9f7d":function(t,e,a){},"9f93":function(t,e,a){},a27d: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:["onUpdate","onUpdateAttr","onUpdateProdAttr"],compnents:{},props:{coms:{type:Array,default:function(){return[]}},isEdit:{type:Number,default:2},isAdmin:{type:Number,default:2},currentIndex:{type:Number,default:0},com:{type:Object,default:null},insertCmd:{type:Object,default:null}},watch:{isEdit:{handler:function(t){var e=this;null==e.com&&e.replaceData(e.com.content).then((function(t){e.content=t,e.$nextTick((function(){e.bindEvents()}))}))},immediate:!0,deep:!0},com:{handler:function(t){var e=this;null!=t&&void 0!=t.content&&null!=t.content&&e.replaceData(t.content).then((function(t){e.content=t,e.$nextTick((function(){e.bindEvents()}))}))},immediate:!0,deep:!0},insertCmd:{handler:function(t){if(null!=t&&1==this.isEdit){var e=this.$refs.editor.instance.getSelection().getSelectedText();t.content.indexOf("Directory",0)>=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='<select id="'+attrId+'" data-index="'+i+'" class="text-input-box">',l=0;l<dataItem.length;l++)item.content==dataItem[l]?selectHtml+='<option value="'+dataItem[l]+'" selected>'+dataItem[l]+"</option>":selectHtml+='<option value="'+dataItem[l]+'">'+dataItem[l]+"</option>";selectHtml+="</select>",data=data.replace("{{"+item.id+"}}",selectHtml)}else data=data.replace("{{"+attrId+"}}",'<input type="text" id="'+attrId+'" data-index="'+i+'" class="text-input-box" value="'+_this.com.attrs[i].content+'">');_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+"}}",'<input type="text" id="'+prodAttrId+'" data-index="'+i+'" class="text-input-box" value="'+_item.content+'">');else{for(_dataItem=_item.attrs.valueItems.split(","),_selectHtml='<select id="'+prodAttrId+'" data-index="'+i+'" class="text-input-box">',l=0;l<_dataItem.length;l++)_item.content==_dataItem[l]?_selectHtml+='<option value="'+_dataItem[l]+'" selected>'+_dataItem[l]+"</option>":_selectHtml+='<option value="'+_dataItem[l]+'">'+_dataItem[l]+"</option>";_selectHtml+="</select>",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("<p>{{"+attrId+"}}</p>","<h1>"+_this.com.attrs[i].content+"</h1>"),data=data.replace("<div>{{"+attrId+"}}</div>","<h1>"+_this.com.attrs[i].content+"</h1>"),data=data.replace("<span>{{"+attrId+"}}</span>","<h1>"+_this.com.attrs[i].content+"</h1>")):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;e<t.com.attrs.length;e++){var a=t.com.attrs[e].id,n=t.com.attrs[e];if("variable"==t.com.attrs[e].type){var r=t.$el.querySelector("#"+a);r&&(2==n.data.value_type?r.addEventListener("change",t.handleInput):r.addEventListener("blur",t.handleInput))}else if("ProductAttr"==t.com.attrs[e].type){var o=n.id+"_"+e,s=t.$el.querySelector("#"+o);s&&(1==n.attrs.type?s.addEventListener("blur",t.handleInputProduct):s.addEventListener("change",t.handleChangeProduct))}}},analysisFormual: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",15);case 8:return c=i[0],a.next=11,n.getFormualData(c);case 11:l=a.sent,o=o.replace(c,"("+parseFloat(l)+")"),a.next=4;break;case 15:return a.abrupt("return",o);case 16:case"end":return a.stop()}}),a)})))()},getFormualData: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=isNaN(c)?t.replace(l,'"'.concat(c,'"')):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=isNaN(c)?t.replace(l,'"'.concat(c,'"')):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("res:",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)})))()},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("<p>{{"+attrId+"}}</p>","<h1>"+_this.com.attrs[i].content+"</h1>"),data=data.replace("<div>{{"+attrId+"}}</div>","<h1>"+_this.com.attrs[i].content+"</h1>"),data=data.replace("<span>{{"+attrId+"}}</span>","<h1>"+_this.com.attrs[i].content+"</h1>")):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){}}]);