import{U as f,a2 as v,ad as h,ag as g,d as w,f as k}from"./vue-vendor-CxLCUzY4.js";import{c9 as T,bp as r}from"./index-B_2CoVdl.js";import{L as C}from"./useTableSync-f6089e8a-C0I0aLzD.js";import"./cgform.data-475d4984-tpXfdvoZ.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./vxe-table-vendor-B5h3MVdD.js";var _=Object.defineProperty,q=Object.defineProperties,x=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,b=(e,t,l)=>t in e?_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l,D=(e,t)=>{for(var l in t||(t={}))V.call(t,l)&&b(e,l,t[l]);if(c)for(var l of c(t))P.call(t,l)&&b(e,l,t[l]);return e},F=(e,t)=>q(e,x(t));const O=w({name:"QueryTable",emits:["query"],setup(e,{emit:t}){const l=k([{title:"字段名称",key:"dbFieldName",width:130},{title:"字段备注",key:"dbFieldTxt",width:130},{title:"控件类型",key:"queryShowType",width:170,type:r.select,options:[{title:"文本框",value:"text"},{title:"日期(yyyy-MM-dd)",value:"date"},{title:"日期（yyyy-MM-dd HH:mm:ss）",value:"datetime"},{title:"时间（HH:mm:ss）",value:"time"},{title:"日期-年",value:"date_year"},{title:"日期-月",value:"date_month"},{title:"日期-周",value:"date_week"},{title:"日期-季度",value:"date_quarter"},{title:"下拉框",value:"list"},{title:"下拉多选框",value:"list_multi"},{title:"下拉搜索框",value:"sel_search"},{title:"分类字典树",value:"cat_tree"},{title:"Popup弹框",value:"popup"},{title:"部门选择",value:"sel_depart"},{title:"用户选择",value:"sel_user"},{title:"省市区组件",value:"pca"},{title:"自定义树控件",value:"sel_tree"},{title:"开关",value:"switch"},{title:"Popup字典",value:"popup_dict"}],defaultValue:"text",placeholder:"请选择${title}",validateRules:[{handler:d}]},{title:"字典Table",key:"queryDictTable",width:130,type:r.textarea,defaultValue:""},{title:"字典Code",key:"queryDictField",width:130,type:r.input,defaultValue:""},{title:"字典Text",key:"queryDictText",width:130,type:r.input,defaultValue:""},{title:"默认值",key:"queryDefVal",width:130,type:r.input,defaultValue:""},{title:"是否启用",key:"queryConfigFlag",minWidth:80,type:r.checkbox,customValue:["1","0"],defaultChecked:!1,props:{isDisabledCell({row:a,column:o}){let{pageTable:i,dbTable:m}=n;const p=i.value.tableRef.getTableData({rowIds:[a.id]})[0];if(["link_table"].includes(p==null?void 0:p.fieldShowType))return a.queryConfigFlag="0",!0;const y=m.value.tableRef.getTableData({rowIds:[a.id]})[0];return(y==null?void 0:y.dbIsPersist)=="0"?(a.queryConfigFlag="0",!0):!1}}}]),u=C(l),{tables:n}=u;function s({row:a,column:o,value:i}){o.key==="queryConfigFlag"&&i==="1"&&t("query",a.id)}function d({cellValue:a,row:o},i){a==null&&o.queryConfigFlag=="1"&&i(!1,"查询启用状态下，控件类型必选~"),i(!0)}return F(D({},u),{columns:l,handleChange:s})}});function H(e,t,l,u,n,s){const d=f("JVxeTable");return v(),h(d,g({ref:"tableRef",rowNumber:"",keyboardEdit:"",maxHeight:e.tableHeight.noToolbar,loading:e.loading,columns:e.columns,dataSource:e.dataSource,disabledRows:{dbFieldName:["id","has_child"]},onValueChange:e.handleChange},e.tableProps),null,16,["maxHeight","loading","columns","dataSource","onValueChange"])}const B=T(O,[["render",H]]);export{B as default};
