2 lines
1.7 KiB
Java
2 lines
1.7 KiB
Java
import{render as s}from"./renderUtils-BumghUlZ.js";import{a as c}from"./user.api-C1eRtqao.js";import{v as i}from"./check.rule.api-Cg4DCH78.js";const m=[{title:"规则名称",dataIndex:"ruleName",width:200,align:"center"},{title:"规则编码",dataIndex:"ruleCode",width:200,align:"center"},{title:"规则描述",dataIndex:"ruleDescription",width:300,align:"center",customRender:function({text:e}){return s.renderTip(e,30)}}],f=[{field:"ruleName",label:"规则名称",component:"Input",colProps:{span:6}},{field:"ruleCode",label:"规则编码",component:"Input",colProps:{span:6}}],h=[{label:"",field:"id",component:"Input",show:!1},{field:"ruleName",label:"规则名称",component:"Input",required:!0,colProps:{span:24}},{field:"ruleCode",label:"规则编码",component:"Input",colProps:{span:24},dynamicDisabled:({values:e})=>!!e.id,dynamicRules:({model:e})=>[{required:!0,validator:(a,r)=>new Promise((l,t)=>{if(!r)return t("请输入规则编码!");let o={tableName:"sys_check_rule",fieldName:"rule_code",fieldVal:r,dataId:e.id};c(o).then(n=>{n.success?l():t("规则编码已存在!")}).catch(n=>{t(n.message||"校验失败")})})}]},{field:"ruleDescription",label:"规则描述",colProps:{span:24},component:"InputTextArea",componentProps:{placeholder:"请输入规则描述",rows:2}}],I=[{label:"123",field:"ruleCode",component:"Input",show:!1},{field:"testValue",label:"需要测试的值:",component:"Input",componentProps:({formModel:e})=>({onChange:a=>{e.testValue=a.target.value}}),dynamicRules:({model:e})=>{const{ruleCode:a}=e;return[{required:!1,validator:(r,l)=>new Promise((t,o)=>{a&&l?i(a,l).then(n=>{n.success?t():o(n.message)}).catch(n=>{o(n.message||n)}):t()})}]}}];export{m as a,I as c,h as f,f as s};
|