(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{480:function(e,t,a){"use strict";a.r(t);var o={name:"formCo",props:{timeFormat:{type:String,default:"timestamp"},formTitle:{type:String},formData:{type:Object},formVisible:{type:Boolean},formKey:{type:Array},formSubBotton:{type:String},formRules:{type:Object},isAdd:{type:Boolean,default:!0},formType:{type:Number},disableField:{type:Array}},methods:{disFunction(e,t){let a=!1;if(this.disableField.forEach(e=>{e===t&&(a=!0)}),1===this.formType){let e=!1;return this.disableField.forEach(a=>{a===t&&(e=!0)}),e}if(0===e)return!0;{let e=!1;return this.disableField.forEach(a=>{a===t&&(e=!0)}),e}},formSubmit(e,t){this.$emit("form-submit",e,t)},cancelForm(){this.$emit("cancel-form")},beforeCancelForm(){this.$emit("before-cancel-form")},formatSelectVal:(e,t)=>"Integer"===t?+e:e}},l=a(12),i=Object(l.a)(o,(function(){var e=this,t=e._self._c;return t("el-dialog",{ref:"form",attrs:{title:e.formTitle,visible:e.formVisible,"close-on-click-modal":!1,"before-close":e.beforeCancelForm},on:{"update:visible":function(t){e.formVisible=t}}},[t("el-form",{ref:"formCommon",attrs:{model:e.formData,"label-width":"130px",rules:e.formRules}},e._l(e.formKey,(function(a){return t("div",{key:a.fieldName},[1===a.isForm?t("el-form-item",{tag:"component",attrs:{label:a.nameCn,prop:a.fieldName}},[t("div",["date"===a.javaType&&!e.isAdd||"textArea"===a.webType||"password"===a.webType?e._e():t(a.webType,{tag:"component",staticStyle:{width:"80%"},attrs:{filterable:"",type:a.javaType,"value-format":e.timeFormat,disabled:e.disFunction(a.isChange,a.fieldName)},model:{value:e.formData[a.fieldName],callback:function(t){e.$set(e.formData,a.fieldName,t)},expression:"formData[col.fieldName]"}},[a.selectList?t("div",e._l(a.selectList,(function(o,l){return t("el-option",{key:l,tag:"component",attrs:{label:o.selectKey,value:e.formatSelectVal(o.selectValue,a.javaType)}})})),1):e._e()]),e._v(" "),"textArea"===a.webType?t("el-input",{staticStyle:{width:"80%"},attrs:{type:"textarea",disabled:e.disFunction(a.isChange,a.fieldName)},model:{value:e.formData[a.fieldName],callback:function(t){e.$set(e.formData,a.fieldName,t)},expression:"formData[col.fieldName]"}}):e._e(),e._v(" "),"password"===a.webType?t("el-input",{staticStyle:{width:"80%"},attrs:{type:"password",disabled:e.disFunction(a.isChange,a.fieldName)},model:{value:e.formData[a.fieldName],callback:function(t){e.$set(e.formData,a.fieldName,t)},expression:"formData[col.fieldName]"}}):e._e(),e._v(" "),e.isAdd||"date"!==a.javaType?e._e():t("el-col",{attrs:{span:8}},[t("el-form-item",{attrs:{prop:"date1"}},[t("el-date-picker",{staticStyle:{width:"95%"},attrs:{type:"datetime",placeholder:"选择时间","value-format":e.timeFormat},model:{value:e.formData[a.fieldName+"_start"],callback:function(t){e.$set(e.formData,a.fieldName+"_start",t)},expression:"formData[col.fieldName + '_start']"}})],1)],1),e._v(" "),e.isAdd||"date"!==a.javaType?e._e():t("el-col",{staticClass:"line",attrs:{span:1}},[e._v("\n            -\n          ")]),e._v(" "),e.isAdd||"date"!==a.javaType?e._e():t("el-col",{attrs:{span:10}},[t("el-form-item",{attrs:{prop:"date2"}},[t("el-date-picker",{staticStyle:{width:"80%"},attrs:{type:a.javaType,placeholder:"选择时间","value-format":e.timeFormat},model:{value:e.formData[a.fieldName+"_end"],callback:function(t){e.$set(e.formData,a.fieldName+"_end",t)},expression:"formData[col.fieldName + '_end']"}})],1)],1)],1)]):e._e()],1)})),0),e._v(" "),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.cancelForm}},[e._v("\n      取消\n    ")]),e._v(" "),t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.formSubmit("formCommon",e.formType)}}},[e._v("\n      "+e._s(e.formSubBotton)+"\n    ")])],1)],1)}),[],!1,null,null,null);t.default=i.exports}}]);