|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-5015"],{"+Cfc":function(e,t,i){"use strict";var n=i("GqPP");i.n(n).a},"1KzC":function(e,t,i){"use strict";var n=i("OhPh");i.n(n).a},"58/J":function(e,t,i){},"5jDI":function(e,t,i){"use strict";i.r(t);var n=i("jWXv"),l=i.n(n),a=i("rfXi"),s=i.n(a),o=i("EJiy"),r=i.n(o),c=i("QbLZ"),d=i.n(c),u=i("6iAj"),f=i("4XAY"),p=i("a/5N"),h=i("t7tB"),m=i("AET2"),v=i("8urS"),_=i("tsk7"),b=i("e5uV"),g=i("x3h8"),y=i("8U2t"),x=i("AEIj"),k=i("INrU"),C=i("9Ezw"),w=i("t2rG"),F=i.n(w),A=i("pGpU"),E=i("bZT/"),O={name:"FieldDetailTable",components:{draggable:F.a,FieldWrapper:C.a,FieldInput:function(){return Promise.resolve().then(i.bind(null,"t7tB"))},FieldTextarea:function(){return Promise.resolve().then(i.bind(null,"AET2"))},FieldSelect:function(){return Promise.resolve().then(i.bind(null,"8urS"))},FieldCheckbox:function(){return Promise.resolve().then(i.bind(null,"tsk7"))},FieldFile:function(){return Promise.resolve().then(i.bind(null,"e5uV"))},FieldBoolean:function(){return Promise.resolve().then(i.bind(null,"x3h8"))},FieldPercent:function(){return Promise.resolve().then(i.bind(null,"8U2t"))},FieldPosition:function(){return Promise.resolve().then(i.bind(null,"AEIj"))},FieldLocation:function(){return Promise.resolve().then(i.bind(null,"INrU"))},FieldWritingSign:function(){return Promise.resolve().then(i.bind(null,"GlKA"))},FieldDateInterval:function(){return Promise.resolve().then(i.bind(null,"Wz3p"))},FieldDescText:function(){return Promise.resolve().then(i.bind(null,"pKHB"))}},filters:{typeToComponentName:function(e){return Object(E.b)(e)}},mixins:[A.a],data:function(){return{dragListConfig:{delay:50,group:{name:"childList",put:["libList"],pull:!1},sort:!1,forceFallback:!0,fallbackClass:"draggingStyle",filter:".empty-box"},selectedPoint:[null,null]}},computed:{isEmpty:function(){return Object(p.b)(this.field.fieldExtendList)},isList:function(){return!0},list:function(){return this.isEmpty?[]:this.field.fieldExtendList},tableData:function(){var e=this,t={};return this.list.forEach(function(i){t[i.fieldName]=e.formatterDefaultValue(i)}),[t]}},methods:{formatterDefaultValue:function(e){return e.default_value?"boolean_value"===e.form_type?{0:"不选中",1:"选中"}[e.default_value]||"不选中":"datatime"===e.form_type||"date_interval"===e.form_type?e.default_value.join("-"):"checkbox"===e.form_type?e.default_value.join(","):"string"==typeof e.default_value?e.default_value:void 0:""},dragListEnd:function(e){},dragAdded:function(e){var t=this;this.$emit("child-drag-add",this.point,e),this.$nextTick(function(){t.selectedPoint=[e.newIndex,0]})}}},j=(i("1KzC"),i("KHd+")),$=Object(j.a)(O,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("field-wrapper",{staticClass:"field-detail-table",attrs:{activate:e.activate,field:e.field,"control-flag":e.controlFlag},on:{click:e.emitClick,action:e.handleAction}},[i("div",{staticClass:"box",class:{"is-empty":e.isEmpty}},[i("draggable",{staticClass:"field-list",class:{"is-table":2===e.field.precisions},attrs:{list:e.list,options:e.dragListConfig},on:{end:e.dragListEnd,add:e.dragAdded}},[e.isEmpty?i("div",{staticClass:"empty-box"},[i("div",{staticClass:"empty-box-title"},[e._v("可拖拽添加多个字段")]),e._v(" "),i("div",{staticClass:"empty-box-desc"},[e._v("(不支持明细中添加明细字段)")])]):e._e(),e._v(" "),e.isEmpty||1!==e.field.precisions?e._e():e._l(e.list,function(t,n){return i(e._f("typeToComponentName")(t),{key:n,tag:"component",staticClass:"draggable-hook",attrs:{field:t,point:[n,0],"active-point":[null,null]},on:{click:e.emitClick}})}),e._v(" "),e.isEmpty||2!==e.field.precisions?e._e():[i("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData,border:""}},[e._l(e.list,function(t,n){return i("el-table-column",{key:n,attrs:{prop:t.fieldName,label:t.name},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row,l=t.column;return[i("div",{staticClass:"input-box"},[e._v("\n "+e._s(n[l.property])+"\n ")])]}}])})}),e._v(" "),i("el-table-column",{attrs:{label:"操作",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-button",[e._v("删除")])]}}])})],2)]],2),e._v(" "),e.isEmpty?e._e():i("div",{staticClass:"add-btn"},[i("el-button",{attrs:{type:"text"}},[i("i",{staticClass:"wk wk-l-plus"}),e._v("\n "+e._s(e.field.remark||"")+"\n ")])],1)],1)])},[],!1,null,"10c8e4e5",null);$.options.__file="FieldDetailTable.vue";var N=$.exports,D=i("GlKA"),L=i("Wz3p"),P=i("pKHB"),S=i("UEfr"),T=i("7Qib"),I={name:"SettingDefault",components:{WkDistpicker:S.a},props:{field:{type:Object,required:!0}},data:function(){return{selectedMapValue:[],detailAddress:"",oldPrecisions:null,areaData:[]}},computed:{disabled:function(){return!Object(E.a)(this.field.operating).defaultEdit},canClearable:function(){var e=this.field.form_type;return!["boolean_value"].includes(e)},type:function(){var e=this.field.form_type;if(["date","datetime"].includes(e))return"datePicker";if(["number","floatnumber","percent"].includes(e))return"number";if(["select","checkbox","boolean_value"].includes(e))return"select";switch(this.field.form_type){case"date_interval":return"date_interval";case"position":return"position";case"textarea":return"textarea";default:return"text"}},options:function(){if("select"!==this.type)return[];var e=this.field.form_type;if(["select","checkbox"].includes(e))return this.field.setting.map(function(e){return{label:e,value:e}});switch(e){case"boolean_value":return[{label:"选中",value:"1"},{label:"不选中",value:"0"}];default:return[]}}},watch:{field:{handler:function(){if("boolean_value"!==this.field.form_type){if("select"===this.type&&Object(p.b)(this.field.setting)&&!Object(p.b)(this.field.options)&&this.$set(this.field,"setting",this.field.options.split(",")),"position"===this.type)if(this.resetDefaultValue(),Object(p.b)(this.field.default_value))this.selectedMapValue=[],Object(p.a)(this.field.default_value)||(this.field.default_value=[]),this.detailAddress="";else if(this.selectedMapValue=this.field.default_value.filter(function(e){return 4!==e.id}),1===this.field.precisions){var e=this.field.default_value.find(function(e){return 4===e.id});this.detailAddress=e?e.name:""}}else this.field.default_value=Object(p.b)(this.field.default_value)?"0":this.field.default_value},deep:!0,immediate:!0}},methods:{inputBlur:function(){},resetDefaultValue:function(){this.oldPrecisions&&this.oldPrecisions!==this.field.precisions?(this.oldPrecisions=this.field.precisions,this.selectedMapValue=[],Object(p.b)(this.field.default_value)||(this.field.default_value=[])):this.oldPrecisions=this.field.precisions},inputPositionChange:function(){if(1!==this.field.precisions){var e=this.field.default_value.findIndex(function(e){return 4===e.id});if(-1===e)return;this.field.default_value.splice(e,1)}else{var t=this.field.default_value.find(function(e){return 4===e.id});t?t.name=this.detailAddress:this.field.default_value.push({code:"",name:this.detailAddress,id:4})}},handleCascaderChange:function(){this.field.default_value=this.selectedMapValue,this.inputPositionChange()},getCascaderValArr:function(e,t){var i=[];if(0===t.length)return i;var n=0,l=Object(T.t)(e);do{var a=l.find(function(e){return e.code===t[n]});a&&(l=a.children||[],i.push({code:a.code,name:a.name,id:n+1})),n++}while(n<=t.length);return i}}},R=(i("8LNg"),Object(j.a)(I,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"setting-default"},["text"===e.type?i("el-input",{attrs:{maxlength:e.field.max_length||100,disabled:e.disabled},on:{blur:e.inputBlur},model:{value:e.field.default_value,callback:function(t){e.$set(e.field,"default_value",t)},expression:"field.default_value"}}):"textarea"===e.type?i("el-input",{attrs:{maxlength:e.field.max_length||800,disabled:e.disabled},on:{blur:e.inputBlur},model:{value:e.field.default_value,callback:function(t){e.$set(e.field,"default_value",t)},expression:"field.default_value"}}):"datePicker"===e.type?i("el-date-picker",{attrs:{disabled:e.disabled,type:"date"===e.field.form_type?"date":"datetime","value-format":"date"===e.field.form_type?"yyyy-MM-dd":"yyyy-MM-dd HH:mm:ss",placeholder:"请选择"},model:{value:e.field.default_value,callback:function(t){e.$set(e.field,"default_value",t)},expression:"field.default_value"}}):"date_interval"===e.type?i("el-date-picker",{attrs:{type:1===e.field.precisions?"daterange":"datetimerange","value-format":1===e.field.precisions?"yyyy-MM-dd":"yyyy-MM-dd HH:mm:ss",disabled:e.disabled,"start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:e.field.default_value,callback:function(t){e.$set(e.field,"default_value",t)},expression:"field.default_value"}}):"select"===e.type?i("el-select",{attrs:{clearable:e.canClearable,multiple:"checkbox"===e.field.form_type,disabled:e.disabled,placeholder:"请选择"},model:{value:e.field.default_value,callback:function(t){e.$set(e.field,"default_value",t)},expression:"field.default_value"}},e._l(e.options,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})):"number"===e.type?[i("el-input",{attrs:{disabled:e.disabled},on:{blur:e.inputBlur},model:{value:e.field.default_value,callback:function(t){e.$set(e.field,"default_value",t)},expression:"field.default_value"}},["percent"===e.field.form_type?i("div",{staticClass:"el-input__icon",attrs:{slot:"suffix"},slot:"suffix"},[e._v("%")]):e._e()]),e._v(" "),i("div",{staticClass:"input-tips"},[i("span",[e._v("*")]),e._v("\n 数字的位数必须少于"+e._s("percent"===e.field.form_type?10:15)+"位\n ")])]:"position"===e.type?[i("wk-distpicker",{attrs:{"hide-area":e.field.precisions>=3,"only-province":4===e.field.precisions,disabled:e.disabled,clearable:""},on:{change:e.handleCascaderChange},model:{value:e.selectedMapValue,callback:function(t){e.selectedMapValue=t},expression:"selectedMapValue"}}),e._v(" "),1===e.field.precisions?i("el-input",{staticStyle:{"margin-top":"5px"},attrs:{rows:3,maxlength:100,disabled:e.disabled,type:"textarea"},on:{change:e.inputPositionChange},model:{value:e.detailAddress,callback:function(t){e.detailAddress=t},expression:"detailAddress"}}):e._e()]:e._e()],2)},[],!1,null,"d4967516",null));R.options.__file="SettingDefault.vue";var V=R.exports,B=i("gDS+"),W=i.n(B),z=i("GQeE"),M=i.n(z),H={name:"SettingOptions",components:{draggable:F.a},props:{field:{type:Object,required:!0},isTableChild:{type:Boolean,default:!1}},data:function(){return{optionsList:[],dialogVisible:!1,dialogContentVal:""}},computed:{optionsEditAuth:function(){return Object(E.a)(this.field.operating).optionsEdit},showOther:function(){return this.field.setting.includes("其他")},dragConfig:function(){return{group:Object(T.s)(),forceFallback:!1,disabled:!this.optionsEditAuth,fallbackClass:"draggingStyle",handle:".drag-hook",filter:".el-input__inner",preventOnFilter:!1}}},watch:{field:{handler:function(e,t){Object(p.b)(this.field.options)&&(this.$set(this.field,"options","选1,选2,选3"),this.$set(this.field,"setting",["选1","选2","选3"])),t&&e.options===t.options||(this.optionsList=this.field.setting.filter(function(e){return"其他"!==e}).map(function(e){return{value:e}}))},deep:!0,immediate:!0}},methods:{handleChange:function(){var e=this,t=this.optionsList.map(function(e){return e.value}).filter(function(e){return!Object(p.b)(e)&&"其他"!==e});if((t=s()(new l.a(t))).length!==this.optionsList.length&&(this.optionsList=t.map(function(e){return{value:e}})),this.showOther&&t.push("其他"),this.field.setting=t,"options_type"===this.field.remark){var i={},n=M()(this.field.optionsData);this.optionsList.forEach(function(t){n.includes(t.value)?i[t.value]=e.field.optionsData[t.value]:i[t.value]=[]}),M()(i).forEach(function(t){e.optionsList.find(function(e){return e.value===t&&"其他"!==t})||delete i[t]}),this.showOther?n.includes("其他")&&(i["其他"]=this.field.optionsData["其他"]):delete i["其他"],this.field.options=W()(i),this.$set(this.field,"optionsData",i)}else this.field.options=t.join(",");this.$set(this.field,"setting",this.field.setting),this.$set(this.field,"options",this.field.options),this.$nextTick(function(){e.checkDefaultValue()})},handleDelete:function(e){var t=null;if(-1!==e)t=this.field.setting[e],this.optionsList.splice(e,1),this.field.setting.splice(e,1);else{var i=this.field.setting.lastIndexOf("其他");-1!==i&&(this.field.setting.splice(i,1),t="其他")}"options_type"===this.field.remark?(delete this.field.optionsData[t],this.$set(this.field,"options",W()(this.field.optionsData))):this.$set(this.field,"options",this.field.setting.join(",")),this.$set(this.field,"setting",this.field.setting),this.checkDefaultValue()},handleAdd:function(){var e=this.getAddValue(this.optionsList.length+1);this.optionsList.push({value:e}),this.handleChange()},handleAddOther:function(){-1===this.field.setting.indexOf("其他")&&this.field.setting.push("其他"),this.$set(this.field,"setting",this.field.setting),"options_type"===this.field.remark?(this.field.optionsData["其他"]=[],this.$set(this.field,"optionsData",this.field.optionsData),this.$set(this.field,"options",W()(this.field.optionsData))):this.$set(this.field,"options",this.field.setting.join(","))},handleUpdateAll:function(){this.dialogContentVal=this.optionsList.map(function(e){return e.value}).join("\n"),this.dialogVisible=!0},handleCloseDialog:function(){this.dialogVisible=!1},handleDialogConfirm:function(){var e=this.dialogContentVal.split(/\n|\r/);e=s()(new l.a(e)).map(function(e){return e.trim()}).filter(function(e){return!Object(p.b)(e)&&"其他"!==e}),this.optionsList=e.map(function(e){return{value:e}}),this.$set(this.field,"remark",null),this.$set(this.field,"optionsData",null),this.handleChange(),this.handleCloseDialog()},getAddValue:function(e){return this.optionsList.find(function(t){return t.value==="选"+e})?this.getAddValue(e+1):"选"+e},checkDefaultValue:function(){var e=this;if(!Object(p.b)(this.field.default_value))if(Object(p.a)(this.field.default_value)){var t=[];this.field.default_value.forEach(function(i){e.optionsList.find(function(e){return e.value===i})&&t.push(i)}),this.$set(this.field,"default_value",[].concat(t))}else{this.optionsList.find(function(t){return t.value===e.field.default_value})||this.$set(this.field,"default_value",null)}}}},q=(i("piGM"),Object(j.a)(H,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"setting-options"},[i("draggable",{attrs:{list:e.optionsList,options:e.dragConfig},on:{sort:e.handleChange}},e._l(e.optionsList,function(t,n){return i("div",{key:n,staticClass:"option-item"},[i("el-input",{attrs:{disabled:!e.optionsEditAuth},on:{change:e.handleChange},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"item.value"}},[e.optionsEditAuth?i("flexbox",{attrs:{slot:"suffix"},slot:"suffix"},[i("div",{staticClass:"el-input__icon drag-hook wk wk-grid"}),e._v(" "),i("el-button",{staticClass:"el-input__icon wk wk-icon-bin",attrs:{type:"text"},on:{click:function(t){e.handleDelete(n)}}})],1):e._e()],1)],1)})),e._v(" "),e.showOther?i("div",{staticClass:"option-item other-item"},[i("el-input",{attrs:{value:"其他",disabled:""}},[e.optionsEditAuth?i("flexbox",{attrs:{slot:"suffix"},slot:"suffix"},[i("el-button",{staticClass:"el-input__icon wk wk-icon-bin",attrs:{type:"text"},on:{click:function(t){e.handleDelete(-1)}}})],1):e._e()],1)],1):e._e(),e._v(" "),e.optionsEditAuth?i("el-button",{staticClass:"add-btn",on:{click:e.handleAdd}},[i("i",{staticClass:"el-icon-plus"}),e._v(" 添加新选项\n ")]):e._e(),e._v(" "),e.optionsEditAuth?i("flexbox",{attrs:{align:"center",justify:"center"}},[i("div",{staticClass:"add-other-btn",on:{click:e.handleAddOther}},[e._v("\n 添加其他\n ")]),e._v(" "),i("flexbox-item"),e._v(" "),i("div",{staticClass:"add-other-btn",on:{click:e.handleUpdateAll}},[e._v("批量编辑")])],1):e._e(),e._v(" "),i("el-dialog",{staticClass:"edit-dialog",attrs:{visible:e.dialogVisible,"before-close":e.handleCloseDialog,title:"批量编辑",width:"500px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[i("div",[i("div",{staticClass:"edit-tips"},[e._v("\n 每行内容对应一个选项,点击完成后,逻辑表单设置将失效\n ")]),e._v(" "),i("el-input",{attrs:{rows:10,resize:"none",type:"textarea"},model:{value:e.dialogContentVal,callback:function(t){e.dialogContentVal=t},expression:"dialogContentVal"}})],1),e._v(" "),i("div",{attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:e.handleCloseDialog}},[e._v("\n 取 消\n ")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:e.handleDialogConfirm}},[e._v("\n 确 定\n ")])],1)])],1)},[],!1,null,"679f6386",null));q.options.__file="SettingOptions.vue";var K=q.exports,U={name:"SettingNumber",props:{field:{type:Object,required:!0}},data:function(){return{checked:!1,precisionList:[],limitChecked:!1,minNumRestrict:void 0,maxNumRestrict:void 0}},watch:{field:{handler:function(){if(["number","floatnumber","percent"].includes(this.field.form_type)){this.field.hasOwnProperty("minNumRestrict")||(this.field.minNumRestrict=null),this.field.hasOwnProperty("maxNumRestrict")||(this.field.maxNumRestrict=null),this.minNumRestrict=Object(p.b)(this.field.minNumRestrict)?void 0:Number(this.field.minNumRestrict),this.maxNumRestrict=Object(p.b)(this.field.maxNumRestrict)?void 0:Number(this.field.maxNumRestrict);var e="percent"===this.field.form_type?5:14;this.precisionList=s()({length:e}).map(function(e,t){return{label:t+1,value:t+1}}),this.field.hasOwnProperty("precisions")||(this.field.precisions="number"===this.field.form_type?4:2),this.field.precisions>e&&(this.field.precisions=e),this.checked=!Object(p.b)(this.field.precisions),this.limitChecked=!Object(p.b)(this.minNumRestrict)||!Object(p.b)(this.maxNumRestrict)}},deep:!0,immediate:!0}},methods:{checkedChange:function(){this.checked?this.field.precisions=2:this.field.precisions=null},handleSelectChange:function(){this.$set(this.field,"precisions",this.field.precisions),this.$forceUpdate()},limitChange:function(){this.limitChecked||(this.minNumRestrict=void 0,this.maxNumRestrict=void 0,this.field.minNumRestrict="",this.field.maxNumRestrict="")},handleChangeNumber:function(e){var t=this[e],i=String(t||"").replace(".","").replace("-","").length,n="percent"===this.field.form_type?10:15;if(i>n)return this.$message.error("最多支持"+n+"位数字"),void(this.field[e]=null);var l=this.minNumRestrict,a=this.maxNumRestrict;Object(p.b)(l)||Object(p.b)(a)||Number(l)>Number(a)&&(this.$message.error("请输入正确的数值范围"),this.field[e]=null);var s=Object(p.b)(l)?"":l,o=Object(p.b)(a)?"":a;this.field.minNumRestrict=null!==this.minNumRestrict?String(s):null,this.field.maxNumRestrict=null!==this.maxNumRestrict?String(o):null}}},G=(i("K8Hv"),i("gnm4"),Object(j.a)(U,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"setting-number"},[i("flexbox",{staticClass:"setting-number-item",attrs:{align:"center",justify:"flex-start"}},[i("el-checkbox",{on:{change:e.checkedChange},model:{value:e.checked,callback:function(t){e.checked=t},expression:"checked"}}),e._v(" "),i("span",{staticStyle:{"font-size":"13px"}},[e._v("支持小数")]),e._v(" "),i("el-tooltip",{attrs:{content:"不选择只能输入整数,勾选后可规定小数位数",effect:"dark","popper-class":"setting-number-tooltip",placement:"top"}},[i("i",{staticClass:"wk wk-help wk-help-tips"})]),e._v(" "),e.checked?[i("span",[e._v("限制 ")]),e._v(" "),i("el-select",{attrs:{size:"small",placeholder:""},on:{change:e.handleSelectChange},model:{value:e.field.precisions,callback:function(t){e.$set(e.field,"precisions",t)},expression:"field.precisions"}},e._l(e.precisionList,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),e._v(" "),i("span",[e._v(" 位")])]:e._e()],2),e._v(" "),i("flexbox",{staticClass:"setting-number-item",attrs:{align:"flex-start",justify:"flex-start",direction:"column"}},[i("el-checkbox",{on:{change:e.limitChange},model:{value:e.limitChecked,callback:function(t){e.limitChecked=t},expression:"limitChecked"}},[e._v("\n 限制数值范围\n ")]),e._v(" "),e.limitChecked?i("flexbox",{staticClass:"number-range-body",attrs:{align:"center",justify:"flex-start"}},[i("flexbox-item",[i("el-input-number",{attrs:{controls:!1,placeholder:"最小值"},on:{change:function(t){e.handleChangeNumber("minNumRestrict")}},model:{value:e.minNumRestrict,callback:function(t){e.minNumRestrict=t},expression:"minNumRestrict"}})],1),e._v(" "),i("div",{staticClass:"number-range-text"},[e._v("~")]),e._v(" "),i("flexbox-item",[i("el-input-number",{attrs:{controls:!1,placeholder:"最大值"},on:{change:function(t){e.handleChangeNumber("maxNumRestrict")}},model:{value:e.maxNumRestrict,callback:function(t){e.maxNumRestrict=t},expression:"maxNumRestrict"}})],1)],1):e._e()],1)],1)},[],!1,null,"220d0228",null));G.options.__file="SettingNumber.vue";var J=G.exports,Z={name:"SettingPrecisions",props:{field:{type:Object,required:!0}},data:function(){return{options:[]}},computed:{optionsEditAuth:function(){return Object(E.a)(this.field.operating).optionsEdit}},watch:{field:{handler:function(){["date_interval","position","select","checkbox"].includes(this.field.form_type)&&("date_interval"===this.field.form_type?this.options=[{label:"日期",value:1},{label:"日期时间",value:2}]:"position"===this.field.form_type?this.options=[{label:"省/地区、市、区/县、详细地址",value:1},{label:"省/地区、市、区/县",value:2},{label:"省/地区、市",value:3},{label:"省/地区",value:4}]:(this.options=[{label:"平铺",value:1},{label:"下拉",value:2}],this.field.precisions||this.$set(this.field,"precisions","checkbox"===this.field.form_type?1:2)),this.field.precisions||this.$set(this.field,"precisions",1))},deep:!0,immediate:!0}}},X=(i("sxMs"),Object(j.a)(Z,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"setting-precisions"},[i("el-select",{attrs:{disabled:!e.optionsEditAuth,placeholder:"请选择"},model:{value:e.field.precisions,callback:function(t){e.$set(e.field,"precisions",t)},expression:"field.precisions"}},e._l(e.options,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1)},[],!1,null,"2bd66ef3",null));X.options.__file="SettingPrecisions.vue";var Y=X.exports,Q=i("glbJ"),ee=i("ehos"),te={name:"SettingRichText",components:{Tinymce:Q.a},props:{field:{type:Object,required:!0}},data:function(){return{debouncedEditorInput:null}},created:function(){this.debouncedEditorInput=Object(ee.debounce)(300,this.editInputChange)},methods:{getEditConfig:function(){return{menubar:!1,statusbar:!1,paste_data_images:!0,paste_enable_default_filters:!1,placeholder:"描述文字内容",content_style:" * {color: #262626; margin: 0;} body { margin: 8px; font-size: 14px; }",paste_retain_style_properties:"border",toolbar_mode:"scrolling",paste_preprocess:function(e,t){["b","strong","i","em"].forEach(function(e){var i=new RegExp("(<"+e+">)|(</"+e+">)]","g");t.content=t.content.replace(i,"")});["h1","h2","h3","h4","h5","h6"].forEach(function(e){var i=new RegExp("<"+e+">","g"),n=new RegExp("</"+e+">","g");t.content=t.content.replace(i,"<p>"),t.content=t.content.replace(n,"</p>")}),t.content=t.content.replace(/<\/font>/gi,"").replace(/<font[^>]+>/gi,"")},paste_postprocess:function(e,t){s()(t.node.querySelectorAll("*")).forEach(function(e){e.style.color="",e.style.fontWeight="",e.style.fontFamily="",e.style.fontSize="",e.style.background=""})}}},editInputChange:function(){}}},ie=(i("c4ua"),Object(j.a)(te,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"setting-rich-text"},[i("tinymce",{ref:"createTinymce",staticClass:"rich-txt",attrs:{init:e.getEditConfig(),height:200,toolbar:"bold italic underline strikethrough | fontselect | forecolor backcolor | fontsizeselect | numlist bullist | alignleft aligncenter alignright | image link | removeformat"},on:{input:e.debouncedEditorInput},model:{value:e.field.default_value,callback:function(t){e.$set(e.field,"default_value",t)},expression:"field.default_value"}})],1)},[],!1,null,"292d1ff4",null));ie.options.__file="SettingDescText.vue";var ne=ie.exports,le=[{componentName:"FieldInput",form_type:"text",name:"单行文本",type:1,icon:"wk wk-icon-text"},{componentName:"FieldTextarea",form_type:"textarea",name:"多行文本",type:2,icon:"wk wk-icon-textarea"},{componentName:"FieldInput",form_type:"website",name:"网址",type:25,icon:"wk wk-icon-website"},{componentName:"FieldBoolean",form_type:"boolean_value",name:"布尔值",type:41,icon:"wk wk-icon-bool"},{componentName:"FieldSelect",form_type:"select",name:"单选",type:3,icon:"wk wk-icon-select"},{componentName:"FieldCheckbox",form_type:"checkbox",name:"多选",type:9,icon:"wk wk-icon-checkbox"},{componentName:"FieldInput",form_type:"number",name:"数字",type:5,icon:"wk wk-icon-int"},{componentName:"FieldInput",form_type:"floatnumber",name:"货币",type:6,icon:"wk wk-icon-coin"},{componentName:"FieldPercent",form_type:"percent",name:"百分数",type:42,icon:"wk wk-icon-percent"},{componentName:"FieldInput",form_type:"mobile",name:"手机",type:7,icon:"wk wk-icon-mobile"},{componentName:"FieldInput",form_type:"email",name:"邮箱",type:14,icon:"wk wk-icon-email"},{componentName:"FieldInput",form_type:"date",name:"日期",type:4,icon:"wk wk-icon-date"},{componentName:"FieldInput",form_type:"datetime",name:"日期时间",type:13,icon:"wk wk-icon-datetime"},{componentName:"FieldDateInterval",form_type:"date_interval",name:"日期区间",type:48,icon:"wk wk-icon-range"},{componentName:"FieldPosition",form_type:"position",name:"地址",type:43,icon:"wk wk-icon-address"},{componentName:"FieldLocation",form_type:"location",name:"定位",type:44,icon:"wk wk-icon-nav"},{componentName:"FieldInput",form_type:"user",name:"人员",type:10,icon:"wk wk-icon-user-data"},{componentName:"FieldInput",form_type:"structure",name:"部门",type:12,icon:"wk wk-icon-users"},{componentName:"FieldFile",form_type:"file",name:"附件",type:8,icon:"wk wk-icon-file"},{componentName:"FieldWritingSign",form_type:"handwriting_sign",name:"手写签名",type:46,icon:"wk wk-icon-signature"},{componentName:"FieldDescText",form_type:"desc_text",name:"描述文字",type:50,icon:"wk wk-icon-des"},{componentName:"FieldDetailTable",form_type:"detail_table",name:"明细表格",type:45,icon:"wk wk-icon-file"}],ae={name:"SettingDetailTable",components:{draggable:F.a},props:{field:{type:Object,required:!0}},data:function(){return{dragConfig:{group:Object(T.s)(),forceFallback:!1,fallbackClass:"draggingStyle",handle:".drag-hook",filter:".el-input__inner",preventOnFilter:!1}}},watch:{field:{handler:function(){this.field.precisions||this.$set(this.field,"precisions",1),this.$set(this.field,"precisions",this.field.precisions),this.$set(this.field,"remark",this.field.remark)},deep:!0,immediate:!0}},methods:{typeObj:function(e){return le.find(function(t){return t.form_type===e})},handleChange:function(){this.$set(this.field,"fieldExtendList",this.field.fieldExtendList)},handleEdit:function(e){this.$emit("child-edit",this.field.fieldExtendList[e])},handleDelete:function(e){this.field.fieldExtendList.splice(e,1),this.$set(this.field,"fieldExtendList",this.field.fieldExtendList)}}},se=(i("fqn2"),Object(j.a)(ae,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"setting-detail-table"},[i("div",{staticClass:"item-section"},[i("div",{staticClass:"name"},[e._v("表格字段")]),e._v(" "),i("draggable",{attrs:{list:e.field.fieldExtendList,options:e.dragConfig},on:{sort:e.handleChange}},e._l(e.field.fieldExtendList,function(t,n){return i("flexbox",{key:n,staticClass:"option-item",attrs:{align:"center",justify:"flex-start"}},[i("i",{staticClass:"type-icon",class:e.typeObj(t.form_type).icon}),e._v(" "),i("div",{staticClass:"option-item__name"},[e._v(e._s(t.name))]),e._v(" "),i("el-button",{staticClass:"option-item__icon wk wk-write",attrs:{type:"text"},on:{click:function(t){e.handleEdit(n)}}}),e._v(" "),i("el-button",{staticClass:"option-item__icon wk wk-icon-bin",attrs:{type:"text"},on:{click:function(t){e.handleDelete(n)}}}),e._v(" "),i("div",{staticClass:"option-item__icon drag-hook wk wk-grid"})],1)}))],1),e._v(" "),i("div",{staticClass:"item-section"},[i("div",{staticClass:"name"},[e._v("动作名")]),e._v(" "),i("div",[i("el-input",{attrs:{maxlength:10},model:{value:e.field.remark,callback:function(t){e.$set(e.field,"remark",t)},expression:"field.remark"}})],1)]),e._v(" "),i("div",{staticClass:"item-section"},[i("div",{staticClass:"name"},[e._v("\n 填写方式\n "),i("el-tooltip",{attrs:{content:"选择明细的填写方式",effect:"dark","popper-class":"setting-number-tooltip",placement:"top"}},[i("i",{staticClass:"wk wk-help wk-help-tips"})])],1),e._v(" "),i("el-radio-group",{model:{value:e.field.precisions,callback:function(t){e.$set(e.field,"precisions",t)},expression:"field.precisions"}},[i("el-radio",{attrs:{label:1}},[e._v("列表")]),e._v(" "),i("el-radio",{attrs:{label:2}},[e._v("表格")])],1)],1)])},[],!1,null,"54524213",null));se.options.__file="SettingDetailTable.vue";var oe=se.exports,re={name:"SettingLogicForm",props:{field:{type:Object,required:!0},fieldArr:{type:Array,required:!0},point:{type:Array,required:!0}},data:function(){return{list:[],dialogVisible:!1}},computed:{optionsEditAuth:function(){return Object(E.a)(this.field.operating).optionsEdit},fieldLibArr:function(){var e=this,t=[],i=[];return this.fieldArr.forEach(function(e){e.forEach(function(e){e.hasOwnProperty("formAssistId")&&!Object(p.b)(e.formAssistId)&&i.push(e.formAssistId)})}),this.fieldArr.forEach(function(n,l){n.forEach(function(n,a){n.hasOwnProperty("formAssistId")&&!Object(p.b)(n.formAssistId)||(n.formAssistId=e.generateFormAssistId(i),i.push(n.formAssistId)),l===e.point[0]&&a===e.point[1]||t.push(n)})}),t.filter(function(e){return"customer"!==e.form_type&&"business"!==e.form_type&&"contract"!==e.form_type})},allFormAssistId:function(){return this.fieldLibArr.map(function(e){return e.formAssistId})}},watch:{field:{handler:function(){if("options_type"!==this.field.remark)this.list=this.field.setting.map(function(e){return{name:e,value:null}});else{var e={};if(this.field.optionsData)e=this.field.optionsData||{};else try{e=JSON.parse(this.field.options)||{}}catch(e){return this.list=this.field.setting.map(function(e){return{name:e,value:null}}),this.$set(this.field,"remark",null),this.$set(this.field,"optionsData",null),void this.$set(this.field,"options",this.field.setting.join(","))}this.list=M()(e).map(function(t){return{name:t,value:Object(p.b)(e[t])?[]:e[t]}})}},deep:!0,immediate:!0},allFormAssistId:{handler:function(){var e=this;if("options_type"===this.field.remark){this.list.forEach(function(t){var i=[];t.value&&t.value.forEach(function(t){e.allFormAssistId.includes(t)&&i.push(t)}),t.value=i});var t={};this.list.forEach(function(e){t[e.name]=e.value}),this.$set(this.field,"optionsData",t)}},deep:!0,immediate:!0}},methods:{generateFormAssistId:function(e){return function t(i){var n=i+1;return e.includes(n)?t(n):n}(1e3)},handleToSet:function(){this.dialogVisible=!0},handleCloseDialog:function(){var e=this;this.$set(this.field,"_remark",""),this.$nextTick(function(){delete e.field._remark}),this.dialogVisible=!1},handleDialogConfirm:function(){var e={};if(this.list.forEach(function(t){e[t.name]=t.value}),0!==this.list.filter(function(e){return!Object(p.b)(e.value)}).length){this.$set(this.field,"remark","options_type"),this.$set(this.field,"optionsData",e);var t=W()(e);this.$set(this.field,"options",t)}else this.$set(this.field,"remark",null),this.$set(this.field,"optionsData",null),this.$set(this.field,"options",this.field.setting.join(","));this.handleCloseDialog()}}},ce=(i("CMGZ"),Object(j.a)(re,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"setting-logic-form"},[i("el-button",{staticClass:"add-btn",attrs:{disabled:!e.optionsEditAuth},on:{click:e.handleToSet}},[e._v("\n 点击配置\n ")]),e._v(" "),i("el-dialog",{staticClass:"edit-dialog",attrs:{visible:e.dialogVisible,"before-close":e.handleCloseDialog,"close-on-click-modal":!1,title:"添加逻辑表单规则",width:"500px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[i("div",[i("div",{staticClass:"edit-tips"},[e._v("\n 选择选项后,才会显示所设置的其他字段\n ")]),e._v(" "),i("div",{staticClass:"edit-table"},[i("flexbox",{staticClass:"edit-table__header row",attrs:{align:"center",justify:"flex-start"}},[i("div",{staticClass:"label"},[e._v("选项内容")]),e._v(" "),i("flexbox-item",{staticClass:"content"},[e._v("显示字段")])],1),e._v(" "),e.list.length>0&&e.fieldLibArr.length>0?i("div",{staticClass:"edit-table__body"},e._l(e.list,function(t,n){return i("flexbox",{key:n,staticClass:"row",attrs:{align:"center",justify:"flex-start"}},[i("div",{staticClass:"label"},[e._v(e._s(t.name))]),e._v(" "),i("flexbox-item",{staticClass:"content"},[i("el-select",{attrs:{placeholder:"请选择",multiple:""},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"item.value"}},e._l(e.fieldLibArr,function(e,t){return i("el-option",{key:t,attrs:{label:"desc_text"===e.form_type?"描述文字":e.name||"未命名",value:e.formAssistId}})}))],1)],1)})):e._e()],1)]),e._v(" "),i("div",{attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:e.handleCloseDialog}},[e._v("\n 取 消\n ")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:e.handleDialogConfirm}},[e._v("\n 确 定\n ")])],1)])],1)},[],!1,null,"684bb709",null));ce.options.__file="SettingLogicForm.vue";var de={name:"FieldSetting",components:{SettingDefault:V,SettingOptions:K,SettingNumber:J,SettingPrecisions:Y,SettingDescText:ne,SettingDetailTable:oe,SettingLogicForm:ce.exports},props:{canTransform:Boolean,transformData:Object,field:{type:Object,required:!0},fieldArr:{type:Array,required:!0},point:{type:Array,required:!0}},data:function(){return{widthOptions:[{value:25},{value:50},{value:75},{value:100}],stylePercentValue:[]}},computed:{typeObj:function(){var e=this;return le.find(function(t){return t.form_type===e.field.form_type})||this.field},fieldAuth:function(){return Object(E.a)(this.field.operating)},canDefault:function(){return!["user","structure","file","location","handwriting_sign","detail_table"].includes(this.field.form_type)},canOptions:function(){return["select","checkbox"].includes(this.field.form_type)},canNumber:function(){return["number","floatnumber","percent"].includes(this.field.form_type)},canPrecisions:function(){return["date_interval","position","select","checkbox"].includes(this.field.form_type)},precisionsTitle:function(){if(!this.canPrecisions)return"";switch(this.field.form_type){case"date_interval":return"日期类型";case"position":return"地址精度";case"select":case"checkbox":return"展示方式";default:return"精度"}},isDescText:function(){return"desc_text"===this.field.form_type},isTableChild:function(){return"detail_table"===this.fieldArr[this.point[0]][this.point[1]].form_type}},watch:{field:{handler:function(){this.stylePercentValue=[Number(this.field.style_percent)||100]},deep:!0,immediate:!0}},methods:{emitUpdateWidth:function(){this.$emit("update-width")},emitChildEdit:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.$emit("child-edit",e)},clickOutSide:function(){this.emitChildEdit()}}},ue=(i("sdLB"),Object(j.a)(de,function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.typeObj?i("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:e.clickOutSide,expression:"clickOutSide"}],staticClass:"field-setting"},[i("div",{staticClass:"setting-title"},[e._v("\n "+e._s(e.typeObj.name)+"\n ")]),e._v(" "),i("div",{staticClass:"setting-body"},[e.isDescText?e._e():[i("div",{staticClass:"item-section"},[i("div",{staticClass:"name"},[e._v("标识名")]),e._v(" "),i("el-input",{attrs:{disabled:!e.fieldAuth.nameEdit},model:{value:e.field.name,callback:function(t){e.$set(e.field,"name",t)},expression:"field.name"}}),e._v(" "),e._m(0)],1),e._v(" "),i("div",{staticClass:"item-section"},[i("div",{staticClass:"name"},[e._v("提示文字")]),e._v(" "),i("el-input",{attrs:{rows:3,type:"textarea",resize:"none"},model:{value:e.field.input_tips,callback:function(t){e.$set(e.field,"input_tips",t)},expression:"field.input_tips"}}),e._v(" "),e._m(1)],1),e._v(" "),"detail_table"===e.field.form_type?i("setting-detail-table",{attrs:{field:e.field},on:{"child-edit":e.emitChildEdit}}):e._e(),e._v(" "),e.canOptions?[i("div",{staticClass:"item-section"},[i("div",{staticClass:"name"},[e._v("选项内容")]),e._v(" "),e._m(2),e._v(" "),i("setting-options",{attrs:{field:e.field,"is-table-child":e.isTableChild}})],1),e._v(" "),e.isTableChild?e._e():i("div",{staticClass:"item-section"},[i("div",{staticClass:"name"},[e._v("逻辑表单")]),e._v(" "),i("setting-logic-form",{attrs:{field:e.field,point:e.point,"field-arr":e.fieldArr}})],1)]:e._e(),e._v(" "),e.canPrecisions?i("div",{staticClass:"item-section"},[i("div",{staticClass:"name"},[e._v("\n "+e._s(e.precisionsTitle)+"\n ")]),e._v(" "),i("setting-precisions",{attrs:{field:e.field}})],1):e._e(),e._v(" "),e.canDefault?i("div",{staticClass:"item-section"},[i("div",{staticClass:"name"},[e._v("默认值")]),e._v(" "),i("setting-default",{attrs:{field:e.field}})],1):e._e(),e._v(" "),e.canNumber?i("div",{staticClass:"item-section"},[i("setting-number",{attrs:{field:e.field}})],1):e._e()],e._v(" "),e.isDescText?i("div",{staticClass:"item-section"},[i("div",{staticClass:"name"},[e._v("内容")]),e._v(" "),i("setting-desc-text",{attrs:{field:e.field}})],1):e._e(),e._v(" "),e.fieldAuth.percentEdit?i("div",{staticClass:"item-section"},[i("div",{staticClass:"name"},[e._v("\n 字段占比 %\n "),i("el-tooltip",{attrs:{content:"配置表单布局,可以单行多字段排布",effect:"dark",placement:"top"}},[i("i",{staticClass:"wk wk-help wk-help-tips",staticStyle:{"margin-left":"3px"}})])],1),e._v(" "),i("el-radio-group",{attrs:{size:"medium"},on:{change:e.emitUpdateWidth},model:{value:e.field.style_percent,callback:function(t){e.$set(e.field,"style_percent",t)},expression:"field.style_percent"}},e._l(e.widthOptions,function(t){return i("el-radio-button",{key:t.value,attrs:{label:t.value}},[e._v(e._s(t.value))])}))],1):e._e(),e._v(" "),e.canTransform&&e.transformData&&e.transformData[e.field.form_type]?i("div",{staticClass:"item-section"},[i("div",{staticClass:"name"},[e._v("转化客户字段")]),e._v(" "),i("el-select",{attrs:{clearable:""},model:{value:e.field.relevant,callback:function(t){e.$set(e.field,"relevant",t)},expression:"field.relevant"}},e._l(e.transformData[e.field.form_type],function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1):e._e(),e._v(" "),e.isDescText?e._e():[e.fieldAuth.nullEdit?i("div",{staticClass:"item-check-section"},[i("el-checkbox",{attrs:{"true-label":1,"false-label":0},model:{value:e.field.is_null,callback:function(t){e.$set(e.field,"is_null",t)},expression:"field.is_null"}},[e._v("设为必填")])],1):e._e(),e._v(" "),e.fieldAuth.uniqueEdit&&!["checkbox","file"].includes(e.field.form_type)?i("div",{staticClass:"item-check-section"},[i("el-checkbox",{attrs:{"true-label":1,"false-label":0},model:{value:e.field.is_unique,callback:function(t){e.$set(e.field,"is_unique",t)},expression:"field.is_unique"}},[e._v("设为唯一")])],1):e._e(),e._v(" "),e.fieldAuth.hiddenEdit?i("div",{staticClass:"item-check-section"},[i("el-checkbox",{attrs:{"true-label":1,"false-label":0},model:{value:e.field.is_hidden,callback:function(t){e.$set(e.field,"is_hidden",t)},expression:"field.is_hidden"}},[e._v("隐藏字段")])],1):e._e()]],2)]):e._e()},[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"input-tips"},[t("span",[this._v("*")]),this._v("标识名不能为空")])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"input-tips"},[t("span",[this._v("*")]),this._v("显示在标识名右侧的说明文字")])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"input-tips"},[t("span",[this._v("*")]),this._v("修改选项后该项设置的逻辑表单会失效")])}],!1,null,"7c2f674e",null));ue.options.__file="index.vue";var fe=ue.exports,pe=i("iCc5"),he=i.n(pe),me=i("V7oC"),ve=i.n(me),_e=function(){function e(t){he()(this,e),this.field_type=0,this.field_id=t.field_id||"",this.name=t.name||"",this.form_type=t.form_type||"",this.is_unique=t.is_unique||0,this.is_null=t.is_null||0,this.is_hidden=t.is_hidden||0,this.input_tips=t.input_tips||"","textarea"===this.form_type&&(this.max_length=t.max_length||800),"checkbox"===this.form_type?this.default_value=t.default_value||[]:this.default_value=t.default_value||"","form"===this.form_type&&(this.formValue=t.formValue||[]),this.setting=t.setting||[],this.is_deleted=0}return ve()(e,[{key:"check",value:function(){return""===this.name?"字段名称不能为空":""}}]),e}(),be={name:"FieldsIndex",components:{FieldInput:h.default,FieldTextarea:m.default,FieldSelect:v.default,FieldCheckbox:_.default,FieldFile:b.default,FieldBoolean:g.default,FieldPercent:y.default,FieldPosition:x.default,FieldLocation:k.default,FieldDetailTable:N,FieldWritingSign:D.default,FieldDateInterval:L.default,FieldDescText:P.default,SettingField:fe,draggable:F.a},filters:{typeToComponentName:function(e){return Object(E.b)(e)}},data:function(){return{moduleType:"",loading:!1,fieldLibList:[],dragLeftConfig:{group:{pull:"clone",put:!1,name:"libList"},forceFallback:!0,sort:!1},movedField:null,dragListConfig:{delay:100,group:{name:"list",put:["libList"],pull:!0},forceFallback:!0,fallbackClass:"draggingStyle"},fieldArr:[],rejectHandle:!0,isChildDragAdd:!1,selectedPoint:[null,null],selectedField:null,transformData:null}},computed:{canTransform:function(){var e=this.selectedPoint[0],t=this.selectedPoint[1];if(!Object(p.b)(e)&&!Object(p.b)(t)&&"detail_table"===this.fieldArr[e][t].form_type)return!1;return"crm_leads"===this.moduleType},title:function(){return{crm_leads:"线索",crm_customer:"客户",crm_contacts:"联系人",crm_business:"商机",crm_contract:"合同",crm_product:"产品",crm_receivables:"回款",crm_visit:"客户回访",crm_marketing:"市场活动"}[this.moduleType]||""}},created:function(){this.moduleType=this.$route.params.type||"",this.initCom(),this.canTransform&&this.getTransformField()},methods:{initCom:function(){"crm_marketing"===this.moduleType?this.fieldLibList=le.filter(function(e){return["user","structure","file"].includes(e.form_type)}):this.fieldLibList=le,this.getFieldList()},getFieldList:function(){var e=this;this.loading=!0;var t=null,i={},n=this.$route.params;"oa_examine"===this.moduleType?(t=u.v,i.types_id=n.id,i.types="oa_examine"):t=u.u,n.label&&(i.types=n.type),t(i).then(function(t){e.fieldArr=t.data||[],t.data.length>0&&e.handleSelect([0,0]),e.rejectHandle=!1,e.loading=!1}).catch(function(){e.loading=!1})},handleLibFieldClick:function(e){this.movedField=e,this.dragLeftEnd()},dragLeftMove:function(e){this.movedField=e},dragLeftEnd:function(e){if(!this.rejectHandle){var t=new _e({name:this.movedField.name,form_type:this.movedField.form_type});if(t.style_percent=100,t.operating=255,"none"!==this.$route.params.label&&(t.label=this.$route.params.label),"desc_text"===this.movedField.form_type&&(t.name=""),"detail_table"===this.movedField.form_type&&(t.operating=232,t.fieldExtendList=[],t.default_value=null,t.remark="添加"+t.name),delete t.field_id,this.isChildDragAdd)return["detail_table","desc_text","handwriting_sign"].includes(t.form_type)?void this.$message.error("此字段内部不能添加该类型的字段"):void this.childDragAddEnd(t,e);var i=null;i=e&&"clone"===e.pullMode&&!Object(p.b)(e.newIndex)?e.newIndex:this.selectedPoint[0]+1,this.fieldArr.splice(i,0,[t]),this.handleSelect([i,0])}},handleChildDragAdd:function(e,t){this.selectedPoint=e,this.isChildDragAdd=!0},childDragAddEnd:function(e,t){e.style_percent=50,e.operating=171;var i=le.find(function(t){return e.form_type===t.form_type});i&&(e.type=i.type);var n=this.selectedPoint[0],l=this.selectedPoint[1],a=this.fieldArr[n][l];Object(p.b)(a.fieldExtendList)&&(a.fieldExtendList=[]),e.fieldName=this.generateFieldName(a.fieldExtendList),a.fieldExtendList.push(e),this.$set(this.fieldArr,n,this.fieldArr[n]),this.handleSelect(this.selectedPoint,e),this.isChildDragAdd=!1},dragListEnd:function(e){this.selectedPoint.splice(0,1,e.newIndex)},handleAction:function(e,t){switch(e){case"top":this.handleActionMoveTop(t);break;case"bottom":this.handleActionMoveBottom(t);break;case"left":this.handleActionExchange(t,-1);break;case"right":this.handleActionExchange(t,1);break;case"copy":this.handleActionCopy(t);break;case"delete":this.handleDelete(t)}},handleActionMoveTop:function(e){var t=this.fieldArr[e[0]-1];if(t&&4!==t.length){var i=this.fieldArr[e[0]][e[1]],n=t[0];if("detail_table"===i.form_type||"detail_table"===n.form_type){var l=[this.fieldArr[e[0]],this.fieldArr[e[0]-1]];this.fieldArr[e[0]-1]=l[0],this.fieldArr[e[0]]=l[1],this.handleSelect([e[0]-1,0])}else{t.push(Object(T.t)(i));var a=this.getWidth(t.length);t.forEach(function(e){e.style_percent=a.style_percent}),this.$set(this.fieldArr,e[0]-1,t);var s=this.fieldArr[e[0]];s.splice(e[1],1),0===s.length?this.fieldArr.splice(e[0],1):(a=this.getWidth(s.length),s.forEach(function(e){e.style_percent=a.style_percent}),this.$set(this.fieldArr,e[0],s)),this.handleSelect([e[0]-1,t.length-1])}}},handleActionMoveBottom:function(e){var t=this.fieldArr[e[0]][e[1]],i=this.fieldArr[e[0]+1][0],n=this.fieldArr[e[0]];if("detail_table"===t.form_type||"detail_table"===i.form_type||1===n.length){var l=[this.fieldArr[e[0]],this.fieldArr[e[0]+1]];this.fieldArr[e[0]+1]=l[0],this.fieldArr[e[0]]=l[1],this.handleSelect([e[0]+1,0])}else{t.style_percent=100,this.fieldArr.splice(e[0]+1,0,[t]),this.fieldArr[e[0]].splice(e[1],1);var a=this.getWidth(n.length);n.forEach(function(e){e.style_percent=a.style_percent}),this.$set(this.fieldArr,e[0],n),this.handleSelect([e[0]+1,0])}},handleActionExchange:function(e,t){var i=this.fieldArr[e[0]],n=this.fieldArr[e[0]][e[1]];i.splice(e[1],1),i.splice(e[1]+t,0,n),this.handleSelect([e[0],e[1]+t])},handleActionCopy:function(e){var t=this.fieldArr[e[0]][e[1]],i=Object(T.t)(t);delete i.field_id,delete i.fieldName,delete i.field,delete i.relevant,i.field_type=0,i.operating=255,"desc_text"===i.form_type&&(i.name=""),this.fieldArr.splice(e[0]+1,0,[i]),this.handleSelect([e[0]+1,e[1]])},handleUpdateFieldWidth:function(){for(var e=this.fieldArr[this.selectedPoint[0]],t=[],i=[],n=0,l=0;l<e.length;l++){var a=e[l];(n+=a.style_percent)<100?i.push(a):n>100?(t.push(Object(T.t)(i)),(i=[]).push(a),n=a.style_percent):(i.push(a),t.push(Object(T.t)(i)),i=[],n=0)}if(i.length>0&&t.push(i),t.length>1){var s,o=this.selectedPoint[0],r=this.selectedPoint[1];(s=this.fieldArr).splice.apply(s,[o,1].concat(t));for(var c=0,d=0;d<t.length;d++)if((c+=t[d].length)>=r+1){o+=d,r=r-c+t[d].length;break}this.handleSelect([o,r])}},getWidth:function(e){return 1===e?{style_percent:100}:2===e?{style_percent:50}:e>2?{style_percent:25}:void 0},handleDelete:function(e){var t=this;this.$confirm("确定删除该自定义字段吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.selectedPoint=[null,null],t.selectedField=null,t.fieldArr[e[0]].splice([e[1]],1),0===t.fieldArr[e[0]].length&&t.fieldArr.splice(e[0],1)}).catch(function(){})},handleSelect:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.selectedPoint=e,this.selectedField=t||this.fieldArr[e[0]][e[1]]},handleChildEdit:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e?this.selectedField=e:this.handleSelect(this.selectedPoint)},generateFieldName:function(e){var t=e.map(function(e){return e.fieldName});return function e(i){for(var n="",l=0;l<i;l++)n+="abcdefghijklmnopqrstuvwxyz"[Math.ceil(25*Math.random())];var a="field_"+n;return t.includes(a)?e(i):a}(6)},handleSave:function(){var e=this;if(!this.rejectHandle){var t=[];this.loading=!0,Object(T.t)(this.fieldArr).forEach(function(e,i){e.forEach(function(e,n){t.push(d()({},e,{form_position:i+","+n}))})});for(var i="select|update|union|and|or|delete|insert|trancate|char|substr|ascii|declare|exec|count|master|into|drop|execute".split("|"),n=[],a=function(a){var o=t[a],r=o.form_position.split(","),c="第"+(Number(r[0])+1)+"行第"+(Number(r[1])+1)+"列";if(o.name=(o.name||"").trim(),"desc_text"!==o.form_type){if(!o.name)return e.$message.error(c+"自定义字段,标识名不能为空"),e.loading=!1,{v:void 0};if(i.includes(o.name))return e.$message.error(c+"自定义字段标识名与系统字段重复,请使用其他字段!"),e.loading=!1,{v:void 0};if(n.includes(o.name))return e.$message.error(c+"自定义字段标识名重复"),e.loading=!1,{v:void 0};if("detail_table"===o.form_type){if(Object(p.b)(o.fieldExtendList))return e.$message.error(c+"明细字段不能为空"),e.loading=!1,{v:void 0};for(var d=0;d<o.fieldExtendList.length;d++){var u=o.fieldExtendList[d];if(delete u.companyId,delete u.id,Object(p.b)(u.default_value)&&(u.default_value=null),u.name=(u.name||"").trim(),!u.name)return e.$message.error(c+"明细字段,标识名不能为空"),e.loading=!1,{v:void 0};if(i.includes(u.name))return e.$message.error(c+"明细字段标识名与系统字段重复,请使用其他字段!"),e.loading=!1,{v:void 0}}var f=o.fieldExtendList.map(function(e){return e.name});if(f.length!==s()(new l.a(f)).length)return e.$message.error(c+"明细字段标识名重复"),e.loading=!1,{v:void 0}}n.push(o.name)}else if(!Object(p.b)(o.default_value)&&o.default_value.length>2e3)return e.$message.error(c+"描述文字类型字段最多设置2000字"),e.loading=!1,{v:void 0};if(!o.type){var h=le.find(function(e){return e.form_type===o.form_type});h&&(o.type=h.type)}if(o.hasOwnProperty("optionsData")&&delete o.optionsData,"mobile"===o.form_type&&o.default_value&&!Object(T.v)(o.default_value))return e.$message.error("输入的手机格式有误"),e.loading=!1,{v:void 0};if("email"===o.form_type&&o.default_value&&!Object(T.u)(o.default_value))return e.$message.error("输入的邮箱格式有误"),e.loading=!1,{v:void 0};if("number"===o.form_type&&o.default_value){var m=Number(o.default_value);if(isNaN(m))return e.$message.error("数字输入错误"),e.loading=!1,{v:void 0};o.default_value=String(m);var v=String(m).split("."),_=String(m).replace(".","").replace("-","").length,b="percent"===o.form_type?10:15;if(_>b)return e.$message.error("最多支持"+b+"位数字(包含小数位)"),e.loading=!1,{v:void 0};var g=Object(p.b)(o.minNumRestrict)?-1/0:Number(o.minNumRestrict||-1/0),y=Object(p.b)(o.maxNumRestrict)?1/0:Number(o.maxNumRestrict||1/0);if(m<g)return e.$message.error("默认值不能小于最小值"),e.loading=!1,{v:void 0};if(m>y)return e.$message.error("默认值不能大于最大值"),e.loading=!1,{v:void 0};if(Object(p.b)(o.precisions))return e.loading=!1,{v:void 0};if(0===o.precisions)return{v:void 0};if(v.length>1&&v[1].length>Number(o.precisions))return e.$message.error("默认值的小数位不能大于"+o.precisions),e.loading=!1,{v:void 0}}},o=0;o<t.length;o++){var c=a(o);if("object"===(void 0===c?"undefined":r()(c)))return c.v}var f={data:t},h=this.$route.params;"none"!==h.label&&(f.types=h.type),"oa_examine"===this.moduleType&&(f.types_id=h.id),"crm_marketing"===this.moduleType&&(f.formId=h.id),({oa_examine:u.w}[this.moduleType]||u.s)(f).then(function(){e.$message({type:"success",message:"操作成功"}),e.loading=!1,e.getFieldList()}).catch(function(){e.loading=!1})}},getTransformField:function(){var e=this;Object(f.x)({types:"crm_customer",module:"crm",action:"save",controller:"customer",format:1}).then(function(t){for(var i={text:[],textarea:[],select:[],checkbox:[],number:[],floatnumber:[],mobile:[],email:[],date:[],datetime:[],user:[],structure:[],boolean_value:[],percent:[],position:[],location:[],handwriting_sign:[],date_interval:[]},n=0;n<t.data.length;n++){var l=t.data[n],a=i[l.form_type];a&&a.push({label:l.name,value:l.field_id})}e.transformData=i}).catch(function(){})},handleCancel:function(){this.$router.go(-1)}}},ge=(i("J5OR"),Object(j.a)(be,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("flexbox",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"fields-index body",attrs:{align:"flex-start",justify:"flex-start"}},[i("flexbox-item",{staticClass:"body-left"},[i("div",{staticClass:"body-left_title"},[e._v("字段库")]),e._v(" "),i("ul",[i("draggable",{staticClass:"lib-wrapper",attrs:{list:e.fieldLibList,options:e.dragLeftConfig,clone:e.dragLeftMove},on:{end:e.dragLeftEnd}},e._l(e.fieldLibList,function(t){return i("div",{key:t.id,staticClass:"lib-item",on:{click:function(i){e.handleLibFieldClick(t)}}},[i("i",{staticClass:"lib-item-icon",class:t.icon}),e._v(" "),i("span",[e._v(e._s(t.name))])])}))],1)]),e._v(" "),i("div",{staticClass:"body-content"},[i("flexbox",{staticClass:"body-content-warp",attrs:{align:"flex-start",justify:"flex-start",direction:"column"}},[i("el-header",[i("div",{staticClass:"title"},[e._v("编辑"+e._s(e.title)+"字段")]),e._v(" "),i("div",[i("el-button",{directives:[{name:"debounce",rawName:"v-debounce",value:e.handleSave,expression:"handleSave"}],attrs:{type:"primary"}},[e._v("保存")]),e._v(" "),i("el-button",{on:{click:e.handleCancel}},[e._v("返回")])],1)]),e._v(" "),i("flexbox-item",{staticClass:"body-content-main",staticStyle:{"margin-left":"0"}},[i("el-main",[i("draggable",{staticClass:"field-list",attrs:{list:e.fieldArr,options:e.dragListConfig},on:{end:e.dragListEnd}},e._l(e.fieldArr,function(t,n){return i("flexbox",{key:n,staticClass:"field-row",attrs:{align:"flex-start",justify:"flex-start"}},e._l(t,function(t,l){return i(e._f("typeToComponentName")(t),{key:l,ref:"fieldItem",refInFor:!0,tag:"component",attrs:{field:t,"field-arr":e.fieldArr,point:[n,l],"active-point":e.selectedPoint},on:{action:e.handleAction,"child-drag-add":e.handleChildDragAdd,click:function(t){e.handleSelect([n,l])}}})}))}))],1)],1)],1)],1),e._v(" "),i("flexbox-item",{staticClass:"body-right",staticStyle:{"margin-left":"0"}},[e.selectedField?i("setting-field",{attrs:{field:e.selectedField,point:e.selectedPoint,"field-arr":e.fieldArr,"can-transform":e.canTransform,"transform-data":e.transformData},on:{"child-edit":e.handleChildEdit,"update-width":e.handleUpdateFieldWidth}}):e._e()],1)],1)},[],!1,null,"4413d5b2",null));ge.options.__file="index.vue";t.default=ge.exports},"8LNg":function(e,t,i){"use strict";var n=i("wdep");i.n(n).a},"8U2t":function(e,t,i){"use strict";i.r(t);var n=i("9Ezw"),l=i("pGpU"),a={name:"FieldPercent",components:{FieldWrapper:n.a},mixins:[l.a],methods:{}},s=(i("vchx"),i("KHd+")),o=Object(s.a)(a,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("field-wrapper",{staticClass:"field-percent",attrs:{activate:e.activate,field:e.field,"control-flag":e.controlFlag},on:{click:e.emitClick,action:e.handleAction}},[i("div",{staticClass:"box"},[i("span",{staticClass:"default-val"},[e._v(e._s(e.field.default_value||""))]),e._v(" "),i("span",{staticClass:"rate"},[e._v("%")])])])},[],!1,null,"304622d8",null);o.options.__file="FieldPercent.vue";t.default=o.exports},"8urS":function(e,t,i){"use strict";i.r(t);var n=i("9Ezw"),l=i("pGpU"),a={name:"FieldSelect",components:{FieldWrapper:n.a},mixins:[l.a],watch:{field:{handler:function(){this.field.precisions||this.$set(this.field,"precisions",2)},deep:!0,immediate:!0}}},s=(i("H2Fx"),i("KHd+")),o=Object(s.a)(a,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("field-wrapper",{staticClass:"field-select",attrs:{activate:e.activate,field:e.field,"control-flag":e.controlFlag},on:{click:e.emitClick,action:e.handleAction}},[1===e.field.precisions?i("el-radio-group",{model:{value:e.field.default_value,callback:function(t){e.$set(e.field,"default_value",t)},expression:"field.default_value"}},e._l(e.field.setting,function(t,n){return i("el-radio",{key:n,attrs:{label:t}},[e._v("\n "+e._s(t)+"\n ")])})):i("flexbox",{staticClass:"select-box"},[i("div",{class:{placeholder:!Boolean(e.field.default_value)}},[e._v("\n "+e._s(e.field.default_value?e.field.default_value:"请选择")+"\n ")]),e._v(" "),i("i",{staticClass:"el-icon-arrow-down el-icon--right"})])],1)},[],!1,null,"7d88f87f",null);o.options.__file="FieldSelect.vue";t.default=o.exports},"9Ezw":function(e,t,i){"use strict";var n={name:"FieldWrapper",props:{field:{type:Object,required:!0},activate:{type:Boolean,default:!1},controlFlag:{type:Object,default:function(){return{top:!1,bottom:!1,left:!1,right:!1,delete:!1,copy:!0}}},hiddenTitle:{type:Boolean,default:!1}},computed:{fieldWidth:function(){return this.field?this.field.style_percent+"%":"100%"}},watch:{field:{handler:function(){this.field&&!this.field.style_percent&&(this.field.style_percent=100)},deep:!0,immediate:!0}},methods:{emitClick:function(e){this.$emit("click",e)},handleControl:function(e,t){this.$emit("action",e,t)}}},l=(i("LLln"),i("KHd+")),a=Object(l.a)(n,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"field-item",class:{activate:e.activate},style:{width:e.fieldWidth},on:{click:function(t){return t.stopPropagation(),e.emitClick(t)}}},[e.hiddenTitle?e._e():i("div",{staticClass:"field-item_title"},[i("span",{staticClass:"required"},[e._v(e._s(e.field.is_null?"*":""))]),e._v(" "),i("span",[e._v(e._s(e.field.name))]),e._v(" "),e.field.input_tips?i("span",{staticClass:"input-tips"},[e._v("\n ("+e._s(e.field.input_tips)+")\n ")]):e._e()]),e._v(" "),i("div",{staticClass:"field-item_body"},[e._t("default")],2),e._v(" "),e.activate?[e.controlFlag.top?i("div",{staticClass:"control-top control-btn",on:{click:function(t){t.stopPropagation(),e.handleControl("top",t)}}},[i("i",{staticClass:"wk wk-icon-top"})]):e._e(),e._v(" "),e.controlFlag.bottom?i("div",{staticClass:"control-bottom control-btn",on:{click:function(t){t.stopPropagation(),e.handleControl("bottom",t)}}},[i("i",{staticClass:"wk wk-icon-top bottom"})]):e._e(),e._v(" "),e.controlFlag.left?i("div",{staticClass:"control-left control-btn",on:{click:function(t){t.stopPropagation(),e.handleControl("left",t)}}},[i("i",{staticClass:"wk wk-transfer"})]):e._e(),e._v(" "),e.controlFlag.right?i("div",{staticClass:"control-right control-btn",on:{click:function(t){t.stopPropagation(),e.handleControl("right",t)}}},[i("i",{staticClass:"wk wk-transfer"})]):e._e(),e._v(" "),i("div",{staticClass:"edit-box"},[e.controlFlag.copy?i("div",{staticClass:"control-copy control-btn",on:{click:function(t){t.stopPropagation(),e.handleControl("copy",t)}}},[i("i",{staticClass:"wk wk-associated"})]):e._e(),e._v(" "),e.controlFlag.delete?i("div",{staticClass:"control-delete control-btn",on:{click:function(t){t.stopPropagation(),e.handleControl("delete",t)}}},[i("i",{staticClass:"wk wk-s-delete"})]):e._e()])]:e._e()],2)},[],!1,null,"10c62d92",null);a.options.__file="FieldWrapper.vue";t.a=a.exports},AEIj:function(e,t,i){"use strict";i.r(t);var n=i("9Ezw"),l=i("pGpU"),a=i("a/5N"),s={name:"FieldPosition",components:{FieldWrapper:n.a},mixins:[l.a],computed:{areaText:function(){return Object(a.b)(this.field.default_value)?"":this.field.default_value.filter(function(e){return 4!==e.id}).map(function(e){return e.name}).join("/")},detailAddress:function(){if(Object(a.b)(this.field.default_value))return"";var e=this.field.default_value.find(function(e){return 4===e.id});return e?e.name:""}},methods:{}},o=(i("kHUc"),i("KHd+")),r=Object(o.a)(s,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("field-wrapper",{staticClass:"field-map-position",attrs:{activate:e.activate,field:e.field,"control-flag":e.controlFlag},on:{click:e.emitClick,action:e.handleAction}},[i("flexbox",{staticClass:"box-select"},[i("div",{class:{placeholder:!Boolean(e.areaText)}},[e._v("\n "+e._s(e.areaText||"请选择")+"\n ")]),e._v(" "),i("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),1===e.field.precisions?i("div",{staticClass:"box-textarea"},[i("div",{class:{placeholder:!Boolean(e.detailAddress)}},[e._v("\n "+e._s(e.detailAddress||"详细地址")+"\n ")])]):e._e()],1)},[],!1,null,"1145b018",null);r.options.__file="FieldPosition.vue";t.default=r.exports},AET2:function(e,t,i){"use strict";i.r(t);var n=i("9Ezw"),l=i("pGpU"),a={name:"FieldTextarea",components:{FieldWrapper:n.a},mixins:[l.a],methods:{}},s=(i("L6nI"),i("KHd+")),o=Object(s.a)(a,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("field-wrapper",{staticClass:"field-textarea",attrs:{activate:e.activate,field:e.field,"control-flag":e.controlFlag},on:{click:e.emitClick,action:e.handleAction}},[i("div",{staticClass:"box"},[i("div",{staticClass:"default-val"},[e._v("\n "+e._s("string"==typeof e.field.default_value?e.field.default_value:"")+"\n ")]),e._v(" "),i("div",{staticClass:"max-tips"},[e._v("\n "+e._s(e.field.default_value.length+"/"+(e.field.max_length||800))+"\n ")])])])},[],!1,null,"e70b512a",null);o.options.__file="FieldTextarea.vue";t.default=o.exports},CMGZ:function(e,t,i){"use strict";var n=i("Sfno");i.n(n).a},ECFz:function(e,t,i){"use strict";var n=i("lOFs");i.n(n).a},GlKA:function(e,t,i){"use strict";i.r(t);var n=i("9Ezw"),l=i("pGpU"),a={name:"FieldWritingSign",components:{FieldWrapper:n.a},mixins:[l.a],methods:{}},s=(i("Ozf1"),i("KHd+")),o=Object(s.a)(a,function(){var e=this.$createElement,t=this._self._c||e;return t("field-wrapper",{staticClass:"field-writing-sign",attrs:{activate:this.activate,field:this.field,"control-flag":this.controlFlag},on:{click:this.emitClick,action:this.handleAction}},[t("div",{staticClass:"box"})])},[],!1,null,"5fff7668",null);o.options.__file="FieldWritingSign.vue";t.default=o.exports},GqPP:function(e,t,i){},H2Fx:function(e,t,i){"use strict";var n=i("Zakc");i.n(n).a},INrU:function(e,t,i){"use strict";i.r(t);var n=i("9Ezw"),l=i("pGpU"),a={name:"FieldCurrentPosition",components:{FieldWrapper:n.a},mixins:[l.a],methods:{}},s=(i("nZ08"),i("KHd+")),o=Object(s.a)(a,function(){var e=this.$createElement,t=this._self._c||e;return t("field-wrapper",{staticClass:"field-current-position",attrs:{activate:this.activate,field:this.field,"control-flag":this.controlFlag},on:{click:this.emitClick,action:this.handleAction}},[t("flexbox",{staticClass:"box",attrs:{align:"center"}},[t("flexbox-item",{staticClass:"default-val"}),this._v(" "),t("span",{staticClass:"wk wk-icon-location"})],1)],1)},[],!1,null,"d94f4fca",null);o.options.__file="FieldLocation.vue";t.default=o.exports},J5OR:function(e,t,i){"use strict";var n=i("hER3");i.n(n).a},K18i:function(e,t,i){},K8Hv:function(e,t,i){"use strict";var n=i("mjkN");i.n(n).a},KD76:function(e,t,i){"use strict";var n=i("sO83");i.n(n).a},KDJf:function(e,t,i){},L6nI:function(e,t,i){"use strict";var n=i("toFn");i.n(n).a},LLln:function(e,t,i){"use strict";var n=i("lHvX");i.n(n).a},NKbr:function(e,t,i){},NzIE:function(e,t,i){},OhPh:function(e,t,i){},Ozf1:function(e,t,i){"use strict";var n=i("u7C6");i.n(n).a},P9Hl:function(e,t,i){},"RU/L":function(e,t,i){i("Rqdy");var n=i("WEpk").Object;e.exports=function(e,t,i){return n.defineProperty(e,t,i)}},Rqdy:function(e,t,i){var n=i("Y7ZC");n(n.S+n.F*!i("jmDH"),"Object",{defineProperty:i("2faE").f})},SEkw:function(e,t,i){e.exports={default:i("RU/L"),__esModule:!0}},Sfno:function(e,t,i){},V7oC:function(e,t,i){"use strict";t.__esModule=!0;var n,l=i("SEkw"),a=(n=l)&&n.__esModule?n:{default:n};t.default=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,a.default)(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}()},VqEE:function(e,t,i){},Wz3p:function(e,t,i){"use strict";i.r(t);var n=i("9Ezw"),l=i("pGpU"),a={name:"FieldDateInterval",components:{FieldWrapper:n.a},mixins:[l.a],methods:{}},s=(i("o9m+"),i("KHd+")),o=Object(s.a)(a,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("field-wrapper",{staticClass:"field-date-interval",attrs:{activate:e.activate,field:e.field,"control-flag":e.controlFlag},on:{click:e.emitClick,action:e.handleAction}},[i("flexbox",{staticClass:"range-box"},[i("i",{staticClass:"el-icon-date icon"}),e._v(" "),i("flexbox-item",{class:{placeholder:!Boolean(e.field.default_value)}},[e._v("\n "+e._s(e.field.default_value[0]||"开始时间")+"\n ")]),e._v(" "),i("span",[e._v("至")]),e._v(" "),i("flexbox-item",{class:{placeholder:!Boolean(e.field.default_value)}},[e._v("\n "+e._s(e.field.default_value[1]||"结束时间")+"\n ")])],1)],1)},[],!1,null,"96905170",null);o.options.__file="FieldDateInterval.vue";t.default=o.exports},Z5jk:function(e,t,i){"use strict";var n=i("NzIE");i.n(n).a},Zakc:function(e,t,i){},aODV:function(e,t,i){},"bZT/":function(e,t,i){"use strict";function n(e){var t=e.toString(2).padStart(8,"0");return{nameEdit:Boolean(Number(t.charAt(0))),deleteEdit:Boolean(Number(t.charAt(1))),defaultEdit:Boolean(Number(t.charAt(2))),percentEdit:Boolean(Number(t.charAt(3))),nullEdit:Boolean(Number(t.charAt(4))),uniqueEdit:Boolean(Number(t.charAt(5))),hiddenEdit:Boolean(Number(t.charAt(6))),optionsEdit:Boolean(Number(t.charAt(7)))}}function l(e){if(0===e.type)return"FieldInput";if(["text","number","floatnumber","mobile","email","date","datetime","user","structure","contacts","customer","contract","business","single_user","website"].includes(e.form_type))return"FieldInput";switch(e.form_type){case"textarea":return"FieldTextarea";case"select":return"FieldSelect";case"checkbox":return"FieldCheckbox";case"file":return"FieldFile";case"boolean_value":return"FieldBoolean";case"percent":return"FieldPercent";case"position":return"FieldPosition";case"location":return"FieldLocation";case"detail_table":return"FieldDetailTable";case"handwriting_sign":return"FieldWritingSign";case"date_interval":return"FieldDateInterval";case"desc_text":return"FieldDescText";default:return"FieldInput"}}i.d(t,"a",function(){return n}),i.d(t,"b",function(){return l})},c4ua:function(e,t,i){"use strict";var n=i("lY3q");i.n(n).a},e5uV:function(e,t,i){"use strict";i.r(t);var n=i("9Ezw"),l=i("pGpU"),a={name:"FieldFile",components:{FieldWrapper:n.a},mixins:[l.a],methods:{}},s=(i("Z5jk"),i("KHd+")),o=Object(s.a)(a,function(){var e=this.$createElement,t=this._self._c||e;return t("field-wrapper",{staticClass:"field-file",attrs:{activate:this.activate,field:this.field,"control-flag":this.controlFlag},on:{click:this.emitClick,action:this.handleAction}},[t("div",{staticClass:"box"},[this._v("\n 请选择文件\n ")])])},[],!1,null,"3ff99cb6",null);o.options.__file="FieldFile.vue";t.default=o.exports},fqn2:function(e,t,i){"use strict";var n=i("o80K");i.n(n).a},gnm4:function(e,t,i){"use strict";var n=i("P9Hl");i.n(n).a},hER3:function(e,t,i){},hJsE:function(e,t,i){"use strict";var n=i("NKbr");i.n(n).a},iCc5:function(e,t,i){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},jwMp:function(e,t,i){},kHUc:function(e,t,i){"use strict";var n=i("aODV");i.n(n).a},kwPb:function(e,t,i){"use strict";var n=i("jwMp");i.n(n).a},lHvX:function(e,t,i){},lOFs:function(e,t,i){},lY3q:function(e,t,i){},lrX2:function(e,t,i){},mjkN:function(e,t,i){},nZ08:function(e,t,i){"use strict";var n=i("K18i");i.n(n).a},o80K:function(e,t,i){},"o9m+":function(e,t,i){"use strict";var n=i("KDJf");i.n(n).a},pGpU:function(e,t,i){"use strict";var n=i("bZT/"),l=i("a/5N");t.a={props:{field:{type:Object,required:!0},fieldArr:{type:Array,default:function(){return[]}},point:{type:Array},activePoint:{type:Array,default:function(){return[]}}},data:function(){return{specialFormType:[]}},computed:{activate:function(){return this.point[0]===this.activePoint[0]&&this.point[1]===this.activePoint[1]},disabled:function(){return!this.fieldAuth.defaultEdit},fieldAuth:function(){return Object(n.a)(this.field.operating)},topFlag:function(){if(Object(l.b)(this.fieldArr))return!1;var e=this.point[0];if(0===e)return!1;var t=this.fieldArr[e-1];return 4!==t.length&&!this.specialFormType.includes(t[0].form_type)},bottomFlag:function(){return!Object(l.b)(this.fieldArr)&&this.point[0]!==this.fieldArr.length-1},leftFlag:function(){return!Object(l.b)(this.fieldArr)&&0!==this.point[1]},rightFlag:function(){if(Object(l.b)(this.fieldArr))return!1;var e=this.point[1],t=this.point[0];return e!==this.fieldArr[t].length-1},copyFlag:function(){return!Object(l.b)(this.fieldArr)&&!["customer","business","contacts","contract","receivables_plan","single_user"].includes(this.field.form_type)},controlFlag:function(){return{top:this.topFlag,bottom:this.bottomFlag,left:this.leftFlag,right:this.rightFlag,delete:this.fieldAuth.deleteEdit,copy:this.copyFlag}}},methods:{emitClick:function(e){this.$emit("click",e)},handleAction:function(e,t){this.$emit("action",e,this.point,t)}}}},pKHB:function(e,t,i){"use strict";i.r(t);var n=i("9Ezw"),l=i("glbJ"),a=i("pGpU"),s={name:"FieldDescText",components:{FieldWrapper:n.a,Tinymce:l.a},mixins:[a.a],methods:{}},o=(i("KD76"),i("hJsE"),i("KHd+")),r=Object(o.a)(s,function(){var e=this.$createElement,t=this._self._c||e;return t("field-wrapper",{staticClass:"field-desc-text",attrs:{activate:this.activate,field:this.field,"control-flag":this.controlFlag,"hidden-title":""},on:{click:this.emitClick,action:this.handleAction}},[t("tinymce",{staticClass:"rich-txt",attrs:{value:this.field.default_value,disabled:!0,toolbar:[],init:{menubar:!1,toolbar_sticky:!0,statusbar:!1,placeholder:"描述文字内容",quickbars_selection_toolbar:!1,contextmenu:"",content_style:" * {color: #262626; margin: 0;} body { font-size: 14px; }",plugins:"autoresize",autoresize_bottom_margin:0}}}),this._v(" "),t("div",{staticClass:"field-desc-text-cover"})],1)},[],!1,null,"10b577e8",null);r.options.__file="FieldDescText.vue";t.default=r.exports},piGM:function(e,t,i){"use strict";var n=i("lrX2");i.n(n).a},sO83:function(e,t,i){e.exports={xrColorPrimary:"#2362FB"}},sdLB:function(e,t,i){"use strict";var n=i("VqEE");i.n(n).a},sxMs:function(e,t,i){"use strict";var n=i("58/J");i.n(n).a},t7tB:function(e,t,i){"use strict";i.r(t);var n=i("9Ezw"),l=i("pGpU"),a={name:"FieldInput",components:{FieldWrapper:n.a},mixins:[l.a],methods:{}},s=(i("ECFz"),i("KHd+")),o=Object(s.a)(a,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("field-wrapper",{staticClass:"field-input",attrs:{activate:e.activate,field:e.field,"control-flag":e.controlFlag},on:{click:e.emitClick,action:e.handleAction}},[i("flexbox",{staticClass:"box",attrs:{align:"center"}},[i("span",{staticClass:"default-val"},[e._v("\n "+e._s("string"==typeof e.field.default_value?e.field.default_value:"")+"\n ")])])],1)},[],!1,null,"282e2644",null);o.options.__file="FieldInput.vue";t.default=o.exports},toFn:function(e,t,i){},tsk7:function(e,t,i){"use strict";i.r(t);var n=i("9Ezw"),l=i("pGpU"),a={name:"FieldCheckbox",components:{FieldWrapper:n.a},mixins:[l.a],watch:{field:{handler:function(){this.field.precisions||this.$set(this.field,"precisions",1)},deep:!0,immediate:!0}}},s=(i("kwPb"),i("KHd+")),o=Object(s.a)(a,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("field-wrapper",{staticClass:"field-checkbox",attrs:{activate:e.activate,field:e.field,"control-flag":e.controlFlag},on:{click:e.emitClick,action:e.handleAction}},[1===e.field.precisions?i("el-checkbox-group",{attrs:{disabled:e.disabled},model:{value:e.field.default_value,callback:function(t){e.$set(e.field,"default_value",t)},expression:"field.default_value"}},e._l(e.field.setting,function(e,t){return i("el-checkbox",{key:t,staticClass:"checkbox",attrs:{label:e}})})):i("div",{staticClass:"select-content"},[i("el-select",{attrs:{multiple:"",placeholder:"请选择"},model:{value:e.field.default_value,callback:function(t){e.$set(e.field,"default_value",t)},expression:"field.default_value"}},e._l(e.field.setting,function(e,t){return i("el-option",{key:t,attrs:{label:e,value:e}})})),e._v(" "),i("div",{staticClass:"mask"})],1)],1)},[],!1,null,"65e204b0",null);o.options.__file="FieldCheckbox.vue";t.default=o.exports},u7C6:function(e,t,i){},vbX9:function(e,t,i){},vchx:function(e,t,i){"use strict";var n=i("vbX9");i.n(n).a},wdep:function(e,t,i){},x3h8:function(e,t,i){"use strict";i.r(t);var n=i("9Ezw"),l=i("pGpU"),a={name:"FieldBoolean",components:{FieldWrapper:n.a},mixins:[l.a],methods:{}},s=(i("+Cfc"),i("KHd+")),o=Object(s.a)(a,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("field-wrapper",{staticClass:"field-boolean",attrs:{activate:e.activate,field:e.field,"control-flag":e.controlFlag},on:{click:e.emitClick,action:e.handleAction}},[i("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},model:{value:e.field.default_value,callback:function(t){e.$set(e.field,"default_value",t)},expression:"field.default_value"}})],1)},[],!1,null,"8f342fb8",null);o.options.__file="FieldBoolean.vue";t.default=o.exports}}]); |