import{r as i}from"./vendor-39c32a1b.js";import{n as r}from"./index-8fa791df.js";const _={__name:"FormItem",props:{data:{type:Object,default:()=>{}},type:{type:String,default:"input"},showBtn:{type:Boolean,default:!0},status:{type:String,default:"clue"}},emits:["hideFormItem","deleteFormItem","requiredFormItem"],setup(n,{emit:t}){const e=n;function s(){t("hideFormItem",e.data)}function a(){t("deleteFormItem",e.data)}function o(l){t("requiredFormItem",e.data,l)}return{__sfc:!0,props:e,emits:t,doHide:s,doDelete:a,doRequired:o}}};var u=function(){var t=this,e=t._self._c,s=t._self._setupProxy;return e("div",{staticClass:"item-con"},[e("div",{staticClass:"item-input",class:{transparent:t.type==="file",large:t.type==="text"}},[t.type==="select"?e("div",{staticClass:"select-con"},[e("div",[t._v("\u8BF7\u9009\u62E9")]),t._m(0)]):t.type==="file"?e("div",[e("el-button",[t._v("+ \u4E0A\u4F20")])],1):t._e()]),t.showBtn?e("div",{staticClass:"item-btn"},[t.data.is_custom===1?e("el-button",{staticClass:"btn",staticStyle:{color:"#ff0015"},attrs:{type:"text"},on:{click:s.doDelete}},[t._v("\u5220\u9664")]):t.data.name!="\u5BA2\u6237\u624B\u673A"&&t.data.name!=="\u540D\u79F0"&&t.data.name!=="\u5BA2\u6237\u5FAE\u4FE1"?e("el-button",{staticClass:"btn",attrs:{type:"text"},on:{click:s.doHide}},[t._v("\u9690\u85CF")]):t._e(),t.data.is_required===0&&t.data.name!="\u5BA2\u6237\u624B\u673A"&&t.data.name!=="\u5BA2\u6237\u5FAE\u4FE1"&&t.data.name!=="\u540D\u79F0"?e("el-button",{staticClass:"btn",attrs:{type:"text"},on:{click:function(a){return s.doRequired(1)}}},[t._v("\u8BBE\u4E3A\u5FC5\u586B")]):t.data.is_required===1&&t.data.name!="\u5BA2\u6237\u624B\u673A"&&t.data.name!=="\u5BA2\u6237\u5FAE\u4FE1"&&t.data.name!=="\u540D\u79F0"?e("el-button",{staticClass:"btn",attrs:{type:"text"},on:{click:function(a){return s.doRequired(0)}}},[t._v("\u53D6\u6D88\u5FC5\u586B")]):t._e()],1):t._e()])},d=[function(){var n=this,t=n._self._c;return n._self._setupProxy,t("div",{staticStyle:{"margin-left":"auto"}},[t("i",{staticClass:"el-icon-caret-bottom"})])}],f=r(_,u,d,!1,null,"0ffc8eb2",null,null);const m=f.exports;const p={__name:"hideDialog",props:{hideItems:{type:Array,default:()=>[]}},emits:["showFormItem"],setup(n,{expose:t,emit:e}){const s=n,a=i(!1);let o=i([]);function l(){a.value=!0,o.value=[]}function c(){a.value=!1,e("showFormItem",o.value)}return t({init:l}),{__sfc:!0,props:s,emits:e,dialogVisible:a,checkValue:o,init:l,showItem:c,formItem:m}}};var v=function(){var t=this,e=t._self._c,s=t._self._setupProxy;return e("el-dialog",{attrs:{title:"\u5DF2\u9690\u85CF\u5B57\u6BB5","append-to-body":!0,"close-on-click-modal":!1,visible:s.dialogVisible,width:"500px"},on:{"update:visible":function(a){s.dialogVisible=a}}},[e("div",{staticClass:"field-list"},[e("el-checkbox-group",{model:{value:s.checkValue,callback:function(a){s.checkValue=a},expression:"checkValue"}},t._l(t.hideItems,function(a,o){return e("el-row",{key:o,staticClass:"check-item"},[e("el-col",{attrs:{span:7}},[e("el-checkbox",{attrs:{label:a.key}},[t._v(t._s(a.name))])],1),e("el-col",{attrs:{span:16}},[e(s.formItem,{attrs:{type:a.type,showBtn:!1,data:a}})],1)],1)}),1)],1),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(a){s.dialogVisible=!1}}},[t._v("\u53D6 \u6D88")]),e("el-button",{attrs:{type:"primary"},on:{click:function(a){return s.showItem()}}},[t._v(" \u663E \u793A ")])],1)])},y=[],b=r(p,v,y,!1,null,"51f2d88e",null,null);const x=b.exports;export{m as f,x as h};
