(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-4858"],{"/7ML":function(e,t,i){},"/tGF":function(e,t,i){},"/xxq":function(e,t,i){"use strict";var n=i("TX6L");i.n(n).a},"0Qre":function(e,t,i){"use strict";var n=i("dL33");i.n(n).a},"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/"),j={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]})}}},O=(i("g53C"),i("KHd+")),$=Object(O.a)(j,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,"647db36c",null);$.options.__file="FieldDetailTable.vue";var N=$.exports,D=i("GlKA"),L=i("Wz3p"),S=i("pKHB"),T=i("UEfr"),P=i("7Qib"),I={name:"SettingDefault",components:{WkDistpicker:T.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(P.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}}},V=(i("DjuF"),Object(O.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,"094ae8a4",null));V.options.__file="SettingDefault.vue";var R=V.exports,M=i("gDS+"),B=i.n(M),W=i("GQeE"),q=i.n(W),z={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(P.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=q()(this.field.optionsData);this.optionsList.forEach(function(t){n.includes(t.value)?i[t.value]=e.field.optionsData[t.value]:i[t.value]=[]}),q()(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=B()(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",B()(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",B()(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)}}}},U=(i("YO4c"),Object(O.a)(z,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,"6c93eb1c",null));U.options.__file="SettingOptions.vue";var H=U.exports,K={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("fVtm"),Object(O.a)(K,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,"0ec38e3e",null));G.options.__file="SettingNumber.vue";var J=G.exports,Y={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}}},Q=(i("BE0Y"),Object(O.a)(Y,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,"76022d08",null));Q.options.__file="SettingPrecisions.vue";var Z=Q.exports,X=i("glbJ"),ee=i("ehos"),te={name:"SettingRichText",components:{Tinymce:X.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,"
"),t.content=t.content.replace(n,"
")}),t.content=t.content.replace(/<\/font>/gi,"").replace(/]+>/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("0Qre"),Object(O.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,"b1b9bdb0",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(P.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("lVR9"),Object(O.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,"f065e7d2",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=q()(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=B()(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("rhnk"),Object(O.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,"90596704",null));ce.options.__file="SettingLogicForm.vue";var de={name:"FieldSetting",components:{SettingDefault:R,SettingOptions:H,SettingNumber:J,SettingPrecisions:Z,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("CCdS"),Object(O.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,"6d5a885a",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:S.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(P.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(P.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