iedc-go/tpt/js/chunk-c155d0dc.8000c006.js
2022-10-31 03:27:23 +08:00

1 line
17 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-c155d0dc"],{"08fb":function(e,t,n){},"6bfc":function(e,t,n){"use strict";n("afe5")},"72ad":function(e){e.exports=JSON.parse('{"form":[{"type":"select","label":"mz","name":"民族","value":1,"options":[{"name":"汉","value":1},{"name":"汉2","value":2},{"name":"汉3","value":3}]},{"type":"time","label":"time","name":"开业时间","value":"2021-10-10"},{"type":"text","label":"address","name":"开业地址","value":"四川省成都市"},{"type":"image","label":"sfz-front","name":"身份证正面","value":""},{"type":"image","label":"sfz-back","name":"身份证反面","value":""},{"type":"file","label":"file","name":"证明材料","fileName":"证明材料.txt","value":""},{"type":"select","label":"radio-test","name":"状态","value":1,"options":[{"name":"成功","value":1},{"name":"失败","value":2}]}]}')},ada9:function(e,t,n){"use strict";n("fb8c")},afe5:function(e,t,n){},b42e:function(e,t,n){},ceb0:function(e,t,n){"use strict";var u=n("f2bf"),c={style:{border:"1px solid #ccc"},class:"full-screen-container"};var l=n("1da1"),a=(n("b0c0"),n("96cf"),n("560e"),n("4e15")),o=n("2934"),a={components:{Editor:a.a,Toolbar:a.b},props:{modelValue:String},emits:["update:modelValue"],data:function(){return{}},setup:function(){var t=Object(u.X)(),e={hoverbarKeys:{attachment:{menuKeys:["downloadAttachment"]}},placeholder:"请输入内容...",MENU_CONF:{uploadImage:{customUpload:function(n,a){return Object(l.a)(regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(o.h)(n);case 2:t=e.sent,a(t.result,"",t.result);case 4:case"end":return e.stop()}},e)}))()}},uploadVideo:{customUpload:function(n,a){return Object(l.a)(regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(o.h)(n);case 2:t=e.sent,a(t.result,null,t.result);case 4:case"end":return e.stop()}},e)}))()}},uploadAttachment:{customUpload:function(n,a){return Object(l.a)(regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(o.h)(n);case 2:t=e.sent,a(n.name,t.result);case 4:case"end":return e.stop()}},e)}))()}}}};Object(u.F)(function(){var e=t.value;null!=e&&e.destroy()});return{editorRef:t,valueHtml:Object(u.Q)(""),mode:"default",toolbarConfig:{insertKeys:{index:0,keys:["uploadAttachment"]}},editorConfig:e,handleCreated:function(e){t.value=e}}},mounted:function(){},methods:{handleChange:function(e){"<p><br></p>"!=e.getHtml()&&this.$emit("update:modelValue",e.getHtml())}},watch:{modelValue:function(){-1==this.modelValue.indexOf("<p>")?this.valueHtml="<p>"+this.modelValue+"</p>":this.valueHtml=this.modelValue}}},r=(n("d1c3"),n("6b0d")),n=n.n(r);t.a=n()(a,[["render",function(e,t,n,a,l,o){var r=Object(u.U)("Toolbar"),i=Object(u.U)("Editor",!0);return Object(u.L)(),Object(u.n)("div",c,[Object(u.s)(r,{style:{"border-bottom":"1px solid #ccc"},editor:a.editorRef,defaultConfig:a.toolbarConfig,mode:a.mode},null,8,["editor","defaultConfig","mode"]),Object(u.s)(i,{style:{height:"700px","overflow-y":"hidden"},modelValue:a.valueHtml,"onUpdate:modelValue":t[0]||(t[0]=function(e){return a.valueHtml=e}),defaultConfig:a.editorConfig,mode:a.mode,onOnCreated:a.handleCreated,onOnChange:o.handleChange},null,8,["modelValue","defaultConfig","mode","onOnCreated","onOnChange"])])}],["__scopeId","data-v-12e6b782"]])},d0c8:function(e,t,n){"use strict";n.r(t);n("9911"),n("b0c0");function a(e){return Object(v.O)("data-v-96cdfb38"),e=e(),Object(v.M)(),e}var v=n("f2bf"),g={key:0},y=Object(v.r)(" 清除 "),w={key:1},k={style:{position:"relative"}},x=["id"],L=a(function(){return Object(v.o)("div",{style:{position:"absolute",top:"10px",left:"10px","z-index":"2",background:"#fff",padding:"5px 10px"}},[Object(v.o)("div",{id:"r-result"},[Object(v.r)("搜索:"),Object(v.o)("input",{type:"text",id:"suggestId",size:"20",value:"",style:{width:"150px"}})]),Object(v.o)("div",{id:"searchResultPanel",style:{border:"1px solid #C0C0C0",width:"150px",height:"auto",display:"none"}})],-1)}),C={key:0},U=["src"],V={key:1,class:"el-icon-plus avatar-uploader-icon"},D=Object(v.r)("上传文件"),_=["title"],H={key:1},T={key:1,class:"radio-wrap"},M={key:2,class:"auth"},P=Object(v.r)("新建"),A=Object(v.r)("取消");var u=n("b85c"),l=(n("d81d"),n("4de4"),n("c740"),n("a434"),n("caad"),n("2532"),n("ac1f"),n("841c"),n("ceb0")),c=n("2934"),o=n("83c5"),r=n("72ad"),l={props:{routerPath:String,routerQuery:Object,editDialogPath:String},components:{Editor:l.a},data:function(){return{formJson:r,fileName:"",templateData:{},formLink:{},form:{},shortcuts:[{text:"今天",value:new Date},{text:"昨天",value:((e=new Date).setTime(e.getTime()-864e5),e)},{text:"一周前",value:((e=new Date).setTime(e.getTime()-6048e5),e)}],HotimeDataTree:[],defaultProps:{children:"children",label:"label",disabled:"disabled"},formAuth:{},checkedKeys:[],mapShow:!1,mapId:"allmap_"+(new Date).getTime()};var e},methods:{clickLink:function(t,n){var e={name:"Table",path:window.Hotime.tableMapData[t.link].path,title:window.Hotime.tableMapData[t.link].parent.label+"-"+window.Hotime.tableMapData[t.link].label};null!=this.editDialogPath?(e.id=0,o.a.$emit("tabs-edit",e)):(o.a.$off("table:"+window.Hotime.tableMapData[t.link].path),o.a.$emit("dialog-edit",e)),o.a.$on("table:"+window.Hotime.tableMapData[t.link].path,function(e){n[t.link]=e,n[t.name]=e.id})},close:function(){null!=this.routerPath&&0<this.routerPath.length?o.a.$emit("tabs-close",{name:"Add",path:this.templateData.path}):null!=this.editDialogPath?o.a.$emit("tabs-edit-close",{name:"Add",path:this.templateData.path}):this.$router.go(-1)},beforeFileUpload:function(e,t){this.fileName=e.name;var n=this;return null==e||Object(c.h)(e).then(function(e){n.form[t]=e.result}),!1},beforeAvatarUpload:function(e,t){var n=this;return null==e||Object(c.h)(e).then(function(e){n.form[t]=e.result}),!1},onSubmit:function(){var t=this;this.$confirm("此操作将进行新建操作,是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var e=window.Hotime;Object(c.a)(e.data.name+"/"+t.templateData.name,t.form).then(function(e){0==e.status?(t.$message({type:"success",message:"新建成功!"}),t.close()):t.$message({type:"warn",message:e.error.msg})})})},routeInit:function(){var e=this,a=this,l=window.Hotime,t={},t=null!=l.mapData[this.routerPath]?(this.templateData=l.mapData[this.routerPath],this.routerQuery):null!=this.editDialogPath?(this.templateData=l.mapData[this.editDialogPath],this.routerQuery):(this.templateData=l.mapData[this.$route.path.substring(0,this.$route.path.lastIndexOf("/add"))],this.$route.query);if(null!=this.templateData){if(null!=this.templateData.columns){var o,n=Object(u.a)(this.templateData.columns);try{for(n.s();!(o=n.n()).done;)!function(){var t,n=o.value;null==n.value&&(n.value=n.name),null!=n.link&&(t=e,Object(c.g)(l.data.name+"/"+n.link,{pageSize:100}).then(function(e){0==e.status&&(t.formLink[n.link]=e.result.data)})),"lng"!=n.name&&"lat"!=n.name||(a.mapShow=!0,navigator.geolocation.getCurrentPosition(function(e){var t=e.coords.longitude,e=e.coords.latitude;a.getMap(t,e)},function(e){return 1==e.code?alert("用户拒绝页面发起的地理位置"):2==e.code?alert("无法获取当前位置"):3==e.code?alert("超时"):alert("未知错误")},{enableHighAcuracy:!0,maximumAge:0,timeout:1e4}))}()}catch(e){n.e(e)}finally{n.f()}}for(var r in t)null==t[r]?this.form[r]="":this.form[r]=t[r];var i=a.getHotimeDataTree(l.data.menus,"");a.HotimeDataTree=i,this.form.auth="",a.formAuth=[],setTimeout(function(){a.changeCss()},20)}},getHotimeDataTree:function(e,t){var n,a=[];for(n in e){var l=e[n];"Home"!=l.name&&(l.menus?l.children=this.getHotimeDataTree(l.menus,l.name):(l.parent_name=t,l.disabled=!l.auth.length,l.children=l.auth.filter(function(e){return"show"!=e}).map(function(e){return{label:window.Hotime.data.labelConfig[e],name:l.name+"_"+e,label_1:e,parent_name:l.name,checked:!1,auth:l.auth}})),l.auth.length&&a.push(l))}return a},checkChange:function(t,e){var n,a,l=this.form.auth?JSON.parse(this.form.auth):{};if(t.parent_name&&(-1!=(a=(n=l[t.parent_name]||[]).findIndex(function(e){return e==t.label_1}))?n.splice(a,1):n.push(t.label_1),"tag"!=t.parent_name&&("1"==n.length&&"show"==n[0]?n=[]:-1==n.findIndex(function(e){return"show"==e})&&n.unshift("show")),l[t.parent_name]=n),t.children&&t.children.length)for(var o in this.forAuth(l,t),t.children)t.children[o].children&&t.children[o].children.length&&this.forAuth(l,t.children[o]);this.form.auth=JSON.stringify(l)},forAuth:function(e,t){t.auth=e[t.name]||[];var n=!1;if(t.auth.length){for(var a in t.Auth)t.auth.includes(a)||(n=!0,t.auth.push(a));n||(t.auth=[])}else for(var l in t.Auth)t.Auth[l]&&!t.auth.includes(l)&&t.auth.push(l);e[t.name]=t.auth},renderContent:function(e,t){var t=t.node,n="";return e("div",{class:n=3===t.level?"foo":n},t.label)},changeCss:function(){for(var e=document.getElementsByClassName("foo"),t=0;t<e.length;t++)e[t].parentNode.style.cssFloat="left",e[t].parentNode.style.styleFloat="left",e[t].parentNode.onmouseover=function(){this.style.backgroundColor="#fff"}},handleExpand:function(){var e=this;setTimeout(function(){e.changeCss()},1)},clearLink:function(e){this.form[e]=""},getMap:function(e,t){function n(){o.clearOverlays();var e=o.pointToOverlayPixel(o.getCenter()),t=o.overlayPixelToPoint({x:e.x,y:e.y});l.form.lng=t.lng,l.form.lat=t.lat,setTimeout(function(){i(t)},30)}var a,l=this,o=new window.BMap.Map(this.mapId),r=new window.BMap.Point(e,t),i=(o.centerAndZoom(r,20),o.enableScrollWheelZoom(!0),function(t){var n,e,a="";a?a.setPosition(t):a=new window.BMap.Marker(t),o.addOverlay(a),n={width:200,height:0,title:"信息窗口"},e=new window.BMap.Geocoder,a.addEventListener("click",function(){e.getLocation(t,function(e){e&&(e=e.address,e=new window.BMap.InfoWindow(e,n),o.openInfoWindow(e,t))})})}),e=(i(r),setTimeout(function(){o.setCenter(r)},100),new window.BMap.Autocomplete({input:"suggestId",location:o})),u=(document.addEventListener&&document.addEventListener("DOMMouseScroll",n,!1),window.onmousewheel=document.onmousewheel=n,o.addEventListener("dragend",n,!1),o.addEventListener("moveend",n,!1),o.addEventListener("zoomend",n,!1),o.addEventListener("resize",n,!1),e.addEventListener("onconfirm",function(e){var t=e.item.value;a=t.province+t.city+t.district+t.street+t.business,t="searchResultPanel",document.getElementById(t).innerHTML="onconfirm<br />index = "+e.item.index+"<br />myValue = "+a,u()}),function(){var t=new window.BMap.LocalSearch(o,{onSearchComplete:function(){var e;null!=t.getResults()?(o.clearOverlays(),t.getResults().getPoi(0)?(e=t.getResults().getPoi(0).point,o.centerAndZoom(e,20),i(e),l.form.lng=e.lng,l.form.lat=e.lat):l.$message.error("未匹配到地点!")):l.$message.error("未找到搜索结果!")}});t.search(a)})}},watch:{},mounted:function(){this.routeInit()}},i=(n("fa6f"),n("6bfc"),n("ada9"),n("6b0d")),n=n.n(i);t.default=n()(l,[["render",function(e,t,n,a,l,o){var r=Object(v.U)("el-button"),i=Object(v.U)("el-form-item"),u=Object(v.U)("el-input"),c=Object(v.U)("Editor"),d=Object(v.U)("el-input-number"),s=Object(v.U)("el-date-picker"),m=Object(v.U)("el-upload"),f=Object(v.U)("el-option"),b=Object(v.U)("el-select"),p=Object(v.U)("el-radio"),h=Object(v.U)("el-tree"),O=Object(v.U)("el-affix"),j=Object(v.U)("el-form");return Object(v.L)(),Object(v.l)(j,{ref:"form",model:l.form,"label-width":"180px",size:"mini",style:{"padding-top":"10px","overflow-y":"auto",width:"90%","padding-right":"30px",background:"white",display:"block","flex-direction":"row","flex-wrap":"wrap","align-content":"flex-start","justify-content":"flex-start"}},{default:Object(v.kb)(function(){return[(Object(v.L)(!0),Object(v.n)(v.b,null,Object(v.S)(l.templateData.columns,function(t){return Object(v.L)(),Object(v.n)("div",{key:t.type},[null!=t.link?(Object(v.L)(),Object(v.n)("div",g,[0!=t.add?(Object(v.L)(),Object(v.l)(i,{key:0,label:t.label+":",required:t.must},{default:Object(v.kb)(function(){return[Object(v.s)(r,{icon:"el-icon-link",href:"javascript:;",onClick:function(e){return o.clickLink(t,l.form)}},{default:Object(v.kb)(function(){return[Object(v.r)(Object(v.Y)(l.form[t.link]&&null!=l.form[t.link][t.value]?l.form[t.link][t.value]:"选择"),1)]}),_:2},1032,["onClick"]),l.form[t.link]?(Object(v.L)(),Object(v.l)(r,{key:0,onClick:function(e){return o.clearLink(t.link)},icon:"el-icon-circle-close"},{default:Object(v.kb)(function(){return[y]}),_:2},1032,["onClick"])):Object(v.m)("",!0)]}),_:2},1032,["label","required"])):Object(v.m)("",!0)])):Object(v.m)("",!0),null==t.link?(Object(v.L)(),Object(v.n)("div",w,["lng"==t.name?(Object(v.L)(),Object(v.l)(i,{key:0,required:t.must},{default:Object(v.kb)(function(){return[Object(v.lb)(Object(v.o)("div",k,[Object(v.o)("div",{id:l.mapId,style:{width:"400px",height:"300px"}},null,8,x),L],512),[[v.hb,l.mapShow]])]}),_:2},1032,["required"])):Object(v.m)("",!0),0!=t.add?(Object(v.L)(),Object(v.l)(i,{key:1,label:t.label+":",style:{width:"400px"},required:t.must},{default:Object(v.kb)(function(){return[null==t.options&&"auth"!=t.type?(Object(v.L)(),Object(v.n)("div",C,["password"==t.type?(Object(v.L)(),Object(v.l)(u,{key:0,modelValue:l.form[t.value],"onUpdate:modelValue":function(e){return l.form[t.value]=e},"show-password":"",style:{width:"400px"}},null,8,["modelValue","onUpdate:modelValue"])):"text"==t.type?(Object(v.L)(),Object(v.l)(u,{key:1,modelValue:l.form[t.value],"onUpdate:modelValue":function(e){return l.form[t.value]=e},type:"textarea",style:{width:"400px"}},null,8,["modelValue","onUpdate:modelValue"])):"textArea"==t.type?(Object(v.L)(),Object(v.l)(c,{key:2,"model-value":l.form[t.value],"onUpdate:model-value":function(e){return l.form[t.value]=e},style:{width:"100%","min-width":"800px"}},null,8,["model-value","onUpdate:model-value"])):"number"==t.type?(Object(v.L)(),Object(v.l)(d,{key:3,modelValue:l.form[t.value],"onUpdate:modelValue":function(e){return l.form[t.value]=e},style:{width:"400px"}},null,8,["modelValue","onUpdate:modelValue"])):"time"==t.type?(Object(v.L)(),Object(v.l)(s,{key:4,"value-format":"YYYY-MM-DD HH:mm:ss",modelValue:l.form[t.value],"onUpdate:modelValue":function(e){return l.form[t.value]=e},style:{width:"400px"},align:"right",type:"datetime",placeholder:"选择日期",shortcuts:l.shortcuts},null,8,["modelValue","onUpdate:modelValue","shortcuts"])):"unixTime"==t.type?(Object(v.L)(),Object(v.l)(s,{key:5,"value-format":"X",modelValue:l.form[t.value],"onUpdate:modelValue":function(e){return l.form[t.value]=e},style:{width:"400px"},align:"right",type:"datetime",placeholder:"选择日期",shortcuts:l.shortcuts},null,8,["modelValue","onUpdate:modelValue","shortcuts"])):"image"==t.type?(Object(v.L)(),Object(v.l)(m,{key:6,action:"#","show-file-list":!1,style:{width:"400px"},"before-upload":function(e){return o.beforeAvatarUpload(e,t.value)}},{default:Object(v.kb)(function(){return[l.form[t.value]?(Object(v.L)(),Object(v.n)("img",{key:0,src:l.form[t.value]},null,8,U)):(Object(v.L)(),Object(v.n)("i",V))]}),_:2},1032,["before-upload"])):"file"==t.type?(Object(v.L)(),Object(v.l)(m,{key:7,class:"file-upload",action:"#","show-file-list":!1,style:{width:"400px"},"before-upload":function(e){return o.beforeFileUpload(e,t.value)}},{default:Object(v.kb)(function(){return[Object(v.s)(r,{type:"primary"},{default:Object(v.kb)(function(){return[D]}),_:1}),Object(v.o)("span",{class:"file-name",title:l.fileName},Object(v.Y)(l.fileName),9,_)]}),_:2},1032,["before-upload"])):Object(v.m)("",!0)])):null!=t.options?(Object(v.L)(),Object(v.n)("div",H,[3<t.options.length?(Object(v.L)(),Object(v.l)(b,{key:0,modelValue:l.form[t.value],"onUpdate:modelValue":function(e){return l.form[t.value]=e},placeholder:"请选择",style:{width:"400px"}},{default:Object(v.kb)(function(){return[(Object(v.L)(!0),Object(v.n)(v.b,null,Object(v.S)(t.options,function(e){return Object(v.L)(),Object(v.l)(f,{key:e.value,label:e.name,value:e.value},null,8,["label","value"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])):t.options.length<4?(Object(v.L)(),Object(v.n)("div",T,[(Object(v.L)(!0),Object(v.n)(v.b,null,Object(v.S)(t.options,function(e){return Object(v.L)(),Object(v.l)(p,{key:e,modelValue:l.form[t.value],"onUpdate:modelValue":function(e){return l.form[t.value]=e},label:e.value},{default:Object(v.kb)(function(){return[Object(v.r)(Object(v.Y)(e.name),1)]}),_:2},1032,["modelValue","onUpdate:modelValue","label"])}),128))])):Object(v.m)("",!0)])):"auth"==t.type?(Object(v.L)(),Object(v.n)("div",M,[Object(v.s)(h,{class:"tree-line",indent:0,data:l.HotimeDataTree,props:l.defaultProps,"node-key":"name","default-checked-keys":l.checkedKeys,"show-checkbox":"",onCheck:o.checkChange,"render-content":o.renderContent,onNodeExpand:o.handleExpand,"default-expand-all":!0},null,8,["data","props","default-checked-keys","onCheck","render-content","onNodeExpand"])])):Object(v.m)("",!0)]}),_:2},1032,["label","required"])):Object(v.m)("",!0)])):Object(v.m)("",!0)])}),128)),Object(v.s)(O,{position:"bottom",offset:0,style:{width:"100%"}},{default:Object(v.kb)(function(){return[Object(v.s)(i,{style:{background:"white","padding-bottom":"10px"}},{default:Object(v.kb)(function(){return[Object(v.s)(r,{type:"primary",onClick:o.onSubmit},{default:Object(v.kb)(function(){return[P]}),_:1},8,["onClick"]),Object(v.s)(r,{onClick:o.close},{default:Object(v.kb)(function(){return[A]}),_:1},8,["onClick"])]}),_:1})]}),_:1})]}),_:1},8,["model"])}],["__scopeId","data-v-96cdfb38"]])},d1c3:function(e,t,n){"use strict";n("b42e")},fa6f:function(e,t,n){"use strict";n("08fb")},fb8c:function(e,t,n){}}]);