1 line
24 KiB
JavaScript
1 line
24 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-b504df5c","chunk-2c065dd6"],{1:function(e,t){},"19b7":function(e,t,l){},2934:function(e,t,l){"use strict";l.d(t,"e",function(){return i}),l.d(t,"d",function(){return o}),l.d(t,"b",function(){return c}),l.d(t,"c",function(){return r}),l.d(t,"a",function(){return s}),l.d(t,"f",function(){return u});var t=l("b0c0"),a=l("b775"),t=l("4328"),n=l.n(t);function i(e,t){return Object(a.b)({url:e,method:"GET",params:t})}function o(e,t){return Object(a.b)({url:e,method:"GET",params:t})}function c(e,t){return Object(a.b)({url:e,method:"DELETE",data:n.a.stringify(t)})}function r(e,t){return Object(a.b)({url:e,method:"PUT",data:n.a.stringify(t)})}function s(e,t){return Object(a.b)({url:e,method:"POST",data:n.a.stringify(t)})}function u(e){var t=new FormData;return t.append("file",e,e.name),Object(a.b)({url:"file",headers:{"Content-Type":"multipart/form-data"},method:"POST",data:t})}},"551f":function(e,t,l){"use strict";l("6781")},6781:function(e,t,l){},"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}]}]}')},"83c5":function(e,t,l){"use strict";l("159b");t.a={list:{},constructor:function(){this.list={}},$on:function(e,t){this.list[e]=this.list[e]||[],this.list[e].push(t)},$emit:function(e,t){this.list[e]&&this.list[e].forEach(function(e){e(t)})},$off:function(e){this.list[e]&&delete this.list[e]}}},"8beb":function(e,t,l){"use strict";l("b110")},a434:function(e,t,l){"use strict";var a=l("23e7"),d=l("23cb"),b=l("a691"),m=l("50c4"),f=l("7b0b"),p=l("65f0"),j=l("8418"),l=l("1dde")("splice"),O=Math.max,h=Math.min;a({target:"Array",proto:!0,forced:!l},{splice:function(e,t){var l,a,n,i,o,c,r=f(this),s=m(r.length),u=d(e,s),e=arguments.length;if(0===e?l=a=0:a=1===e?(l=0,s-u):(l=e-2,h(O(b(t),0),s-u)),9007199254740991<s+l-a)throw TypeError("Maximum allowed length exceeded");for(n=p(r,a),i=0;i<a;i++)(o=u+i)in r&&j(n,i,r[o]);if(l<(n.length=a)){for(i=u;i<s-a;i++)c=i+l,(o=i+a)in r?r[c]=r[o]:delete r[c];for(i=s;s-a+l<i;i--)delete r[i-1]}else if(a<l)for(i=s-a;u<i;i--)c=i+l-1,(o=i+a-1)in r?r[c]=r[o]:delete r[c];for(i=0;i<l;i++)r[i+u]=arguments[i+2];return r.length=s-a+l,n}})},acf7:function(e,t,l){"use strict";var m=l("9f9f"),f={class:"basic-form"},p={class:"add-wrap",style:{"margin-bottom":"5px"}},j={key:0,style:{color:"red"}},O={key:0,class:"select-wrap"},h=Object(m.r)("添加"),v={key:1,class:"select-list",style:{"margin-left":"100px"}},y=["title"],g=Object(m.r)(": "),k=["title"],w=Object(m.r)("删除"),V=Object(m.r)("上移"),F={key:2,class:"form-list-common form-list"},U=["title"],L=Object(m.r)(": "),x=["title"],B=Object(m.r)("删除"),T=Object(m.r)("上移"),D={key:3,class:"form-list-file form-list"},S={key:0,class:"img-item"},C=["title"],_=Object(m.r)("删除"),M=Object(m.o)("i",{class:"el-icon-plus",style:{"line-height":"60px"}},null,-1),E={key:1,class:"file-item",style:{display:"flex"}},z=["title"],A=Object(m.r)("文件上传"),P=Object(m.r)("删除"),$=["src"];l("a434"),l("b0c0");var n=l("2934"),a=l("b775"),i={props:{basicForm:{type:String,default:JSON.stringify({form:[],files:[]})},basicForm1:{type:String,default:JSON.stringify({form:[],files:[]})},inline:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},data:function(){return{imgDialogImageUrl:"",imgDialogVisible:!1,addType:"common",selectType:"",formErrorMsg:"",selectErrorMsg:"",addBasicForm:{type:"",label:"",value:"",options:[]},form:"",showAddSelect:!1,selectLabel:"",selectValue:"",baseurl:a.a,disabledDate:function(e){return e.getTime()>Date.now()},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)}],mzOptions:["汉族","蒙古族","回族","藏族","维吾尔族","苗族","彝族","壮族","布依族","朝鲜族","满族","侗族","瑶族","白族","土家族","哈尼族","哈萨克族","傣族","黎族","傈僳族","佤族","畲族","高山族","拉祜族","水族","东乡族","纳西族","景颇族","柯尔克孜族","土族","达斡尔族","仫佬族","羌族","布朗族","撒拉族","毛南族","仡佬族","锡伯族","阿昌族","普米族","塔吉克族","怒族","乌孜别克族","俄罗斯族","鄂温克族","德昂族","保安族","裕固族","京族","塔塔尔族","独龙族","鄂伦春族","赫哲族","门巴族","珞巴族","基诺族"]};var e},created:function(){null!=this.basicForm&&"null"!=this.basicForm?this.form=JSON.parse(this.basicForm):this.form=this.basicForm1},mounted:function(){},computed:{formStyle:function(){return this.inline?{display:"flex"}:{display:"block"}}},methods:{handleImgRemove:function(e,t,l){l.value=t},handleFileRemove:function(e,t,l){l.value=t},handlePictureCardPreview:function(e){this.imgDialogImageUrl=e.url,this.imgDialogVisible=!0},clickAddSelectOption:function(){var e;this.selectLabel?this.selectValue?(this.selectErrorMsg="",e={label:this.selectLabel,value:this.selectValue},this.addBasicForm.options.push(e),this.selectLabel="",this.selectValue=""):this.selectErrorMsg=" 请输入单列值":this.selectErrorMsg="请输入单列名"},clickDeleteFile:function(e){this.form.files.splice(e,1)},clickDeleteForm:function(e){this.form.form.splice(e,1)},clickMoveForm:function(e,t){0!==t&&(this.form.form.splice(t-1,0,e),this.form.form.splice(t+1,1))},clickDeleteSelect:function(e){this.addBasicForm.options.splice(e,1)},clickMoveSelect:function(e,t){0!==t&&(this.addBasicForm.options.splice(t-1,0,e),this.addBasicForm.options.splice(t+1,1))},selectChange:function(e){this.showAddSelect=!1,"img"===e||"file"===e?(this.addType="file",this.addBasicForm={type:this.selectType,label:"",s:9,value:[]}):"mz"===e?(this.addType="mz",this.addBasicForm={type:this.selectType,label:"",value:""}):"select"===e?(this.addType="common",this.showAddSelect=!0,this.addBasicForm={type:this.selectType,label:"",value:"",options:[]}):(this.addType="common",this.addBasicForm={type:this.selectType,label:"",value:""})},clickAddForm:function(){var e;"file"===this.addType?(e={type:this.addBasicForm.type,label:this.addBasicForm.label,s:this.addBasicForm.s,value:this.addBasicForm.value},this.addBasicForm.label?(this.form.files.push(e),this.addBasicForm.type="",this.addBasicForm.label="",this.addBasicForm.s=9,this.addBasicForm.value=[],this.formErrorMsg="",this.selectType="",this.addType="common"):this.formErrorMsg="请输入名称"):this.addBasicForm.label?this.addBasicForm.value?(this.formErrorMsg="",e={type:this.addBasicForm.type,label:this.addBasicForm.label,value:this.addBasicForm.value},"select"===this.selectType&&(e.options=this.addBasicForm.options,this.showAddSelect=!1),this.form.form.push(e),this.addBasicForm.type="",this.addBasicForm.label="",this.addBasicForm.value="",this.addBasicForm.options=[],this.selectType=""):"mz"===this.addType?this.formErrorMsg="请选择民族":this.formErrorMsg="请输入值":this.formErrorMsg="请输入名称"},beforeImgUpload:function(e,t){var l=this;return null==e||Object(n.f)(e).then(function(e){t.value.push({url:l.baseurl+e.result})}),!1},beforeFileUpload:function(t,l){var a=this;return null==t||Object(n.f)(t).then(function(e){l.value.push({name:t.name,url:a.baseurl+e.result})}),!1}},watch:{}};l("d024");i.render=function(e,t,l,a,n,i){var o=Object(m.U)("el-option"),c=Object(m.U)("el-select"),r=Object(m.U)("el-input"),s=Object(m.U)("el-input-number"),u=Object(m.U)("el-button"),d=Object(m.U)("el-upload"),b=Object(m.U)("el-dialog");return Object(m.L)(),Object(m.n)("div",f,[Object(m.o)("div",p,[Object(m.s)(c,{modelValue:n.selectType,"onUpdate:modelValue":t[0]||(t[0]=function(e){return n.selectType=e}),placeholder:"类型",onChange:i.selectChange},{default:Object(m.jb)(function(){return[Object(m.s)(o,{label:"text",value:"text"}),Object(m.s)(o,{label:"mz",value:"mz"}),Object(m.s)(o,{label:"select",value:"select"}),Object(m.s)(o,{label:"number",value:"number"}),Object(m.s)(o,{label:"img",value:"img"}),Object(m.s)(o,{label:"file",value:"file"})]}),_:1},8,["modelValue","onChange"]),Object(m.s)(r,{modelValue:n.addBasicForm.label,"onUpdate:modelValue":t[1]||(t[1]=function(e){return n.addBasicForm.label=e}),modelModifiers:{trim:!0},placeholder:"表单名称"},null,8,["modelValue"]),Object(m.kb)(Object(m.s)(c,{modelValue:n.addBasicForm.value,"onUpdate:modelValue":t[2]||(t[2]=function(e){return n.addBasicForm.value=e}),placeholder:"民族"},{default:Object(m.jb)(function(){return[(Object(m.L)(!0),Object(m.n)(m.b,null,Object(m.S)(n.mzOptions,function(e,t){return Object(m.L)(),Object(m.l)(o,{key:t,label:e,value:e},null,8,["label","value"])}),128))]}),_:1},8,["modelValue"]),[[m.gb,"mz"===n.addType]]),Object(m.kb)(Object(m.s)(r,{modelValue:n.addBasicForm.value,"onUpdate:modelValue":t[3]||(t[3]=function(e){return n.addBasicForm.value=e}),modelModifiers:{trim:!0},placeholder:"表单值"},null,8,["modelValue"]),[[m.gb,"common"===n.addType&&"number"!==n.selectType]]),Object(m.kb)(Object(m.s)(s,{modelValue:n.addBasicForm.value,"onUpdate:modelValue":t[4]||(t[4]=function(e){return n.addBasicForm.value=e}),placeholder:"表单值"},null,8,["modelValue"]),[[m.gb,"common"===n.addType&&"number"===n.selectType]]),Object(m.kb)(Object(m.s)(s,{modelValue:n.addBasicForm.s,"onUpdate:modelValue":t[5]||(t[5]=function(e){return n.addBasicForm.s=e}),min:1,max:10,placeholder:"最大上传"},null,8,["modelValue"]),[[m.gb,"img"===n.selectType||"file"===n.selectType]]),Object(m.s)(u,{type:"primary",style:{"margin-right":"5px"},icon:"el-icon-plus",onClick:i.clickAddForm},null,8,["onClick"]),n.formErrorMsg?(Object(m.L)(),Object(m.n)("span",j,Object(m.Y)(n.formErrorMsg),1)):Object(m.m)("",!0)]),n.showAddSelect?(Object(m.L)(),Object(m.n)("div",O,[Object(m.o)("span",{class:"select-add-name",style:Object(m.C)([{"margin-right":"2px"},{color:n.selectErrorMsg?"red":"black"}])},Object(m.Y)(n.selectErrorMsg||"单列数据:"),5),Object(m.s)(r,{modelValue:n.selectLabel,"onUpdate:modelValue":t[6]||(t[6]=function(e){return n.selectLabel=e}),modelModifiers:{trim:!0},placeholder:"单列名"},null,8,["modelValue"]),Object(m.s)(r,{modelValue:n.selectValue,"onUpdate:modelValue":t[7]||(t[7]=function(e){return n.selectValue=e}),modelModifiers:{trim:!0},placeholder:"单列值"},null,8,["modelValue"]),Object(m.s)(u,{type:"primary",onClick:i.clickAddSelectOption},{default:Object(m.jb)(function(){return[h]}),_:1},8,["onClick"])])):Object(m.m)("",!0),null!=n.showAddSelect&&null!=n.addBasicForm&&null!=n.addBasicForm.options&&0<n.addBasicForm.options.length?(Object(m.L)(),Object(m.n)("div",v,[(Object(m.L)(!0),Object(m.n)(m.b,null,Object(m.S)(n.addBasicForm.options,function(t,l){return Object(m.L)(),Object(m.n)("div",{class:"select-list-item",key:l},[Object(m.o)("div",{class:"name",title:t.label},Object(m.Y)(t.label),9,y),g,Object(m.o)("div",{class:"value",title:t.value},Object(m.Y)(t.value),9,k),Object(m.s)(u,{type:"danger",onClick:function(e){return i.clickDeleteSelect(l)}},{default:Object(m.jb)(function(){return[w]}),_:2},1032,["onClick"]),Object(m.s)(u,{type:"primary",onClick:function(e){return i.clickMoveSelect(t,l)}},{default:Object(m.jb)(function(){return[V]}),_:2},1032,["onClick"])])}),128))])):Object(m.m)("",!0),n.form.form&&0<n.form.form.length?(Object(m.L)(),Object(m.n)("div",F,[(Object(m.L)(!0),Object(m.n)(m.b,null,Object(m.S)(n.form.form,function(t,l){return Object(m.L)(),Object(m.n)("div",{class:"form-common-item",style:{display:"flex"},key:l},[Object(m.o)("div",{class:"name",title:t.label},Object(m.Y)(t.label),9,U),L,"select"!==t.type?(Object(m.L)(),Object(m.n)("div",{key:0,class:"value",title:t.value},Object(m.Y)(t.value),9,x)):Object(m.m)("",!0),"select"===t.type?(Object(m.L)(),Object(m.l)(c,{key:1,modelValue:t.value,"onUpdate:modelValue":function(e){return t.value=e},placeholder:"请选择"},{default:Object(m.jb)(function(){return[(Object(m.L)(!0),Object(m.n)(m.b,null,Object(m.S)(t.options,function(e,t){return Object(m.L)(),Object(m.l)(o,{key:t,label:e.label,value:e.value},null,8,["label","value"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])):Object(m.m)("",!0),Object(m.s)(u,{type:"danger",onClick:function(e){return i.clickDeleteForm(l)}},{default:Object(m.jb)(function(){return[B]}),_:2},1032,["onClick"]),Object(m.s)(u,{type:"primary",onClick:function(e){return i.clickMoveForm(t,l)}},{default:Object(m.jb)(function(){return[T]}),_:2},1032,["onClick"])])}),128))])):Object(m.m)("",!0),n.form.files&&0<n.form.files.length?(Object(m.L)(),Object(m.n)("div",D,[(Object(m.L)(!0),Object(m.n)(m.b,null,Object(m.S)(n.form.files,function(l,t){return Object(m.L)(),Object(m.n)("div",{class:"form-file-item",key:t},["img"==l.type?(Object(m.L)(),Object(m.n)("div",S,[Object(m.o)("div",{class:"name",title:l.label},[Object(m.r)(Object(m.Y)(l.label)+": ",1),Object(m.s)(u,{type:"danger",size:"small",style:{float:"right"},onClick:function(e){return i.clickDeleteFile(t)}},{default:Object(m.jb)(function(){return[_]}),_:2},1032,["onClick"])],8,C),Object(m.s)(d,{action:"#","show-file-list":!0,"on-preview":i.handlePictureCardPreview,"on-remove":function(e,t){i.handleImgRemove(e,t,l)},"list-type":"picture-card","file-list":l.value,limit:l.s||9,style:{width:"400px"},"before-upload":function(e){return i.beforeImgUpload(e,l)}},{default:Object(m.jb)(function(){return[M]}),_:2},1032,["on-preview","on-remove","file-list","limit","before-upload"])])):Object(m.m)("",!0),"file"==l.type?(Object(m.L)(),Object(m.n)("div",E,[Object(m.o)("div",{class:"name",title:l.label},Object(m.Y)(l.label)+":",9,z),Object(m.s)(d,{action:"#",class:"upload-file","show-file-list":!0,"on-remove":function(e,t){i.handleFileRemove(e,t,l)},"file-list":l.value,limit:l.s||9,style:{width:"250px"},"before-upload":function(e){return i.beforeFileUpload(e,l)}},{default:Object(m.jb)(function(){return[Object(m.s)(u,{size:"small",type:"primary"},{default:Object(m.jb)(function(){return[A]}),_:1})]}),_:2},1032,["on-remove","file-list","limit","before-upload"]),Object(m.s)(u,{type:"danger",size:"small",onClick:function(e){return i.clickDeleteFile(t)}},{default:Object(m.jb)(function(){return[P]}),_:2},1032,["onClick"])])):Object(m.m)("",!0)])}),128))])):Object(m.m)("",!0),Object(m.s)(b,{modelValue:n.imgDialogVisible,"onUpdate:modelValue":t[8]||(t[8]=function(e){return n.imgDialogVisible=e}),style:{width:"800px",height:"600px"}},{default:Object(m.jb)(function(){return[Object(m.o)("img",{style:{width:"100%",height:"400px"},src:n.imgDialogImageUrl,alt:"图片预览"},null,8,$)]}),_:1},8,["modelValue"])])};t.a=i},b110:function(e,t,l){},b775:function(e,t,l){"use strict";l.d(t,"a",function(){return r});var a=l("d3b7"),n=l("bc3a"),a=l.n(n),n=l("4328"),i=l.n(n),o=l("2bea"),c=l("56d7"),r="";a.a.defaults.withCredentials=!0,a.a.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8";a=a.a.create({baseURL:r,timeout:2e4});a.interceptors.request.use(function(e){return"get"===e.method&&(e.paramsSerializer=function(e){return i.a.stringify(e,{arrayFormat:"repeat"})}),e.withCredentials=!0,e},function(e){Promise.reject(e)}),a.interceptors.response.use(function(e){return 2!==e.data.statu?e.data:(o.b.Message({showClose:!0,message:"登录信息丢失,请重新登陆!",type:"error",duration:2e3,offset:100}),void c.app.$router.push({path:"/login"}))},function(e){var t="err:"+e,l={};return e.response?l=e.response.data:(-1!=t.indexOf("timeout")?(l.code=500,l.message="请求超时,请稍后再试"):-1!=t.indexOf("Network Error")?(l.code=500,l.message="网络错误,请稍后再试"):(l.code=500,l.message=""+e),l)}),t.b=a},d024:function(e,t,l){"use strict";l("19b7")},d0c8:function(e,t,l){"use strict";l.r(t);l("9911"),l("b0c0");var h=l("9f9f");Object(h.O)("data-v-4b440c12");var v={key:0},y={key:0},g={key:1},k={key:0},w=["src"],V={key:1,class:"el-icon-plus avatar-uploader-icon"},F=Object(h.r)("上传文件"),U=["title"],L={key:1},x={key:1,class:"radio-wrap"},B=Object(h.r)("新建"),T=Object(h.r)("取消");Object(h.M)();var o=l("b85c"),a=l("acf7"),c=l("2934"),n=l("b775"),i=l("83c5"),r=l("72ad"),a={props:{routerPath:String,routerQuery:Object},components:{BasicForm:a.a},data:function(){return{formJson:r,fileName:"",templateData:{},baseurl:n.a,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)}]};var e},methods:{close:function(){null!=this.routerPath&&0<this.routerPath.length?i.a.$emit("tabs-close",{name:"Add",path:this.templateData.path}):this.$router.go(-1)},beforeFileUpload:function(e,t){this.fileName=e.name;var l=this;return null==e||Object(c.f)(e).then(function(e){l.form[t]=e.result}),!1},beforeAvatarUpload:function(e,t){var l=this;return null==e||Object(c.f)(e).then(function(e){l.form[t]=e.result}),!1},onSubmit:function(){var l=this,a=this;this.$confirm("此操作将进行新建操作,是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var e=window.Hotime,t=l.$refs.basicForm.form;a.form.rule=JSON.stringify(t),Object(c.a)(e.data.name+"/"+a.templateData.name,a.form).then(function(e){0==e.status?(a.$message({type:"success",message:"新建成功!"}),a.close()):a.$message({type:"warn",message:e.error.msg})})})},routeInit:function(){var e=this,a=window.Hotime,t={},t=null!=a.mapData[this.routerPath]?(this.templateData=a.mapData[this.routerPath],this.routerQuery):(this.templateData=a.mapData[this.$route.path.substring(0,this.$route.path.lastIndexOf("/add"))],this.$route.query);if(null!=this.templateData){if(null!=this.templateData.columns){var n,l=Object(o.a)(this.templateData.columns);try{for(l.s();!(n=l.n()).done;)!function(){var t,l=n.value;null==l.value&&(l.value=l.name),null!=l.link&&(t=e,Object(c.e)(a.data.name+"/"+l.link,{pageSize:100}).then(function(e){0==e.status&&(t.formLink[l.link]=e.result.data)}))}()}catch(e){l.e(e)}finally{l.f()}}for(var i in t)null==t[i]?this.form[i]="":this.form[i]=t[i]}}},watch:{},mounted:function(){this.routeInit()}};l("551f"),l("8beb");a.render=function(e,t,l,a,n,i){var o=Object(h.U)("el-option"),c=Object(h.U)("el-select"),r=Object(h.U)("el-form-item"),s=Object(h.U)("el-input"),u=Object(h.U)("el-input-number"),d=Object(h.U)("el-date-picker"),b=Object(h.U)("el-upload"),m=Object(h.U)("el-button"),f=Object(h.U)("BasicForm"),p=Object(h.U)("el-radio"),j=Object(h.U)("el-affix"),O=Object(h.U)("el-form");return Object(h.L)(),Object(h.l)(O,{ref:"form",model:n.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(h.jb)(function(){return[(Object(h.L)(!0),Object(h.n)(h.b,null,Object(h.S)(n.templateData.columns,function(t){return Object(h.L)(),Object(h.n)("div",{key:t.type},[null!=t.link?(Object(h.L)(),Object(h.n)("div",v,[0!=t.add?(Object(h.L)(),Object(h.l)(r,{key:0,label:t.label+":"},{default:Object(h.jb)(function(){return[Object(h.s)(c,{modelValue:n.form[t.name],"onUpdate:modelValue":function(e){return n.form[t.name]=e},placeholder:"请选择",style:{width:"400px"}},{default:Object(h.jb)(function(){return[Object(h.s)(o,{label:"请选择",value:""}),null!=n.formLink[t.link]?(Object(h.L)(),Object(h.n)("div",y,[(Object(h.L)(!0),Object(h.n)(h.b,null,Object(h.S)(n.formLink[t.link],function(e){return Object(h.L)(),Object(h.l)(o,{key:e.id,label:e[t.value],value:e.id},null,8,["label","value"])}),128))])):Object(h.m)("",!0)]}),_:2},1032,["modelValue","onUpdate:modelValue"])]}),_:2},1032,["label"])):Object(h.m)("",!0)])):Object(h.m)("",!0),null==t.link?(Object(h.L)(),Object(h.n)("div",g,[0!=t.add?(Object(h.L)(),Object(h.l)(r,{key:0,label:t.label+":",style:{width:"400px"}},{default:Object(h.jb)(function(){return[null==t.options?(Object(h.L)(),Object(h.n)("div",k,["password"==t.type?(Object(h.L)(),Object(h.l)(s,{key:0,modelValue:n.form[t.value],"onUpdate:modelValue":function(e){return n.form[t.value]=e},"show-password":"",style:{width:"400px"}},null,8,["modelValue","onUpdate:modelValue"])):Object(h.m)("",!0),"text"==t.type?(Object(h.L)(),Object(h.l)(s,{key:1,modelValue:n.form[t.value],"onUpdate:modelValue":function(e){return n.form[t.value]=e},style:{width:"400px"}},null,8,["modelValue","onUpdate:modelValue"])):Object(h.m)("",!0),"number"==t.type?(Object(h.L)(),Object(h.l)(u,{key:2,modelValue:n.form[t.value],"onUpdate:modelValue":function(e){return n.form[t.value]=e},style:{width:"400px"}},null,8,["modelValue","onUpdate:modelValue"])):Object(h.m)("",!0),"time"==t.type?(Object(h.L)(),Object(h.l)(d,{key:3,modelValue:n.form[t.value],"onUpdate:modelValue":function(e){return n.form[t.value]=e},style:{width:"400px"},align:"right","value-format":"X",type:"datetime",placeholder:"选择日期",shortcuts:n.shortcuts},null,8,["modelValue","onUpdate:modelValue","shortcuts"])):Object(h.m)("",!0),"image"==t.type?(Object(h.L)(),Object(h.l)(b,{key:4,action:"#","show-file-list":!1,style:{width:"400px"},"before-upload":function(e){return i.beforeAvatarUpload(e,t.value)}},{default:Object(h.jb)(function(){return[n.form[t.value]?(Object(h.L)(),Object(h.n)("img",{key:0,src:n.baseurl+n.form[t.value]},null,8,w)):(Object(h.L)(),Object(h.n)("i",V))]}),_:2},1032,["before-upload"])):Object(h.m)("",!0),"file"==t.type?(Object(h.L)(),Object(h.l)(b,{key:5,class:"file-upload",action:"#","show-file-list":!1,style:{width:"400px"},"before-upload":function(e){return i.beforeFileUpload(e,t.value)}},{default:Object(h.jb)(function(){return[Object(h.s)(m,{size:"small",type:"primary"},{default:Object(h.jb)(function(){return[F]}),_:1}),Object(h.o)("span",{class:"file-name",title:n.fileName},Object(h.Y)(n.fileName),9,U)]}),_:2},1032,["before-upload"])):Object(h.m)("",!0),"form"==t.type?(Object(h.L)(),Object(h.l)(f,{key:6,ref:"basicForm"},null,512)):Object(h.m)("",!0)])):Object(h.m)("",!0),null!=t.options?(Object(h.L)(),Object(h.n)("div",L,[2!==t.options.length?(Object(h.L)(),Object(h.l)(c,{key:0,modelValue:n.form[t.value],"onUpdate:modelValue":function(e){return n.form[t.value]=e},placeholder:"请选择",style:{width:"400px"}},{default:Object(h.jb)(function(){return[(Object(h.L)(!0),Object(h.n)(h.b,null,Object(h.S)(t.options,function(e){return Object(h.L)(),Object(h.l)(o,{key:e.value,label:e.name,value:e.value},null,8,["label","value"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])):Object(h.m)("",!0),2===t.options.length?(Object(h.L)(),Object(h.n)("div",x,[Object(h.s)(p,{modelValue:n.form[t.value],"onUpdate:modelValue":function(e){return n.form[t.value]=e},label:t.options[0].value},{default:Object(h.jb)(function(){return[Object(h.r)(Object(h.Y)(t.options[0].name),1)]}),_:2},1032,["modelValue","onUpdate:modelValue","label"]),Object(h.s)(p,{modelValue:n.form[t.value],"onUpdate:modelValue":function(e){return n.form[t.value]=e},label:t.options[1].value},{default:Object(h.jb)(function(){return[Object(h.r)(Object(h.Y)(t.options[1].name),1)]}),_:2},1032,["modelValue","onUpdate:modelValue","label"])])):Object(h.m)("",!0)])):Object(h.m)("",!0)]}),_:2},1032,["label"])):Object(h.m)("",!0)])):Object(h.m)("",!0)])}),128)),Object(h.s)(j,{position:"bottom",offset:0,style:{width:"100%"}},{default:Object(h.jb)(function(){return[Object(h.s)(r,{style:{background:"white","padding-bottom":"10px"}},{default:Object(h.jb)(function(){return[Object(h.s)(m,{type:"primary",onClick:i.onSubmit},{default:Object(h.jb)(function(){return[B]}),_:1},8,["onClick"]),Object(h.s)(m,{onClick:i.close},{default:Object(h.jb)(function(){return[T]}),_:1},8,["onClick"])]}),_:1})]}),_:1})]}),_:1},8,["model"])},a.__scopeId="data-v-4b440c12";t.default=a}}]); |