export const basicComponents = [ { ctrlType: 'input', //控件类型英文名 name: '', //控件字段别名 tableName: '', //控件所绑定的业务对象 boDefAlias: '', //控件所绑定的业务对象属性 desc: '单行文本',//控件类型中文描述 icon: 'icon-danhangwenben', //控件左侧icon显示 options: { width: '100%', // 自定义控件宽度 isWidth: true, //是否设置控件的宽度 defaultValue: '',//控件设置的默认值 isCountDate: false, //日期计算 mathExp: '', //统计函数 isStartDate: '', //日期计算的开始时间 isEndDate: '', //日期计算结束时间 countFormat: 'day', //计算周期 dataType: 'string|number', //数据类型 validateList: [], //控件的校验规则的数组 validate: '', //已选择控件的校验规则 validateType: 'confirmed|email|regex|id_card|min|max|min_value|max_value|isAfter|isBefore|isStart|isEnd|numeric|between|is|digits|mobile|required|row_unique|alpha_spaces|alpha_dash|alpha_num|alpha|frontJSValidate|backendValidate|decimal', advancedProperty: 'isInputEdit|isBindIdentity|inputType|bindPreAndSufFix', //控件可以支持的校验规则 placeholder: '', //字段没有内容时显示的文本(placeholder) disabled: false, //是否禁用该控件 basicsProperty: 'input|dateCount|placeholder', bindIdentityjson: {}, //流水号对象 isBindPreAndSufFix: false, //控件是否可以前缀文本框前部分固定的内容,后缀则后部分 bindPreAndSufFixjson: { preFix: '', sufSix: '' },//可以绑定的前缀文本框前部分固定的内容,后缀则后部分内容 formulasDiyJs: '', //公式计算 showCondition: { target: '', fieldPath: '', value: '' }, //显示设置(为true时,绑定字段显示),绑定的目标,路径,值 noBindModel: false, //控件是否不绑定属性 customInput: '', //时间的默认值 labelAlign: '', //高级属性的标题对齐方式 custDefaultSelectVal: 'custom', //默认值默认显示自定义 isValidate: true // 控件禁用时是否执行校验 } }, { ctrlType: 'textarea', name: '', tableName: '', boDefAlias: '', desc: '多行文本', icon: 'icon-duohangwenben', options: { width: '100%', isWidth: true, defaultValue: '', dataType: 'string|text', validateList: [], validateType: 'regex|min|max|required|row_unique|frontJSValidate|backendValidate', advancedProperty: 'isEditor|isInputEdit', disabled: false, placeholder: '', basicsProperty: 'placeholder', formulasDiyJs: '', noBindModel: false, customInput: '', customValueBase64: '', // 自定义默认值是富文本时,需传入base64转换后的值 labelAlign: '', custDefaultSelectVal: 'custom', isEditor: false, maxlength: '200', showWordLimit: false, isValidate: true } }, // 说明 { ctrlType: 'explain', tableName: '', boDefAlias: '', noTitle: true, name: '', desc: '说明', icon: 'icon-shuoming', noTooltip: true, options: { textValue: '说明内容', isLabelShow: true, noBindModel: true, marginTop: '10px', marginBottom: '', hideLabel: true } }, { ctrlType: 'number', name: '', tableName: '', boDefAlias: '', desc: '数字', icon: 'icon-shuzi', options: { width: '100%', isWidth: true, defaultValue: 0, validateType: 'min_value|max_value|confirmed|numeric|between|digits|required|row_unique|frontJSValidate|mobile', validateList: [], validate: '', dataType: 'number', filterthousandBit: '',//千分位 filtercurrency: '',//货币(大写) min: 0, max: 999999999, step: 1, decimalDigits: "", maxDecimalDigits: 99, numberMax: 999999999, numberMin: -999999999, mathExp: '', disabled: false, controlsPosition: '', //位置 advancedProperty: 'inputType|bindPreAndSufFix|disabled', basicsProperty: 'number|currency|placeholder|dateCount', company: '', //扩展单位配置项, formulasDiyJs: '', bindPreAndSufFixjson: { preFix: '', sufSix: '' }, noBindModel: false, labelAlign: '', // contentAlign: 'center', //left right showCompanys: '', //格式化显示设置 controls: true, //是否显示快捷加减操作 isValidate: true } }, // { // ctrlType: "numeric", // name: "", // desc: "数字(numeric)", // icon: "icon-number", // options: { // width: "100%", // isWidth: true, // defaultValue: 0, // validateType: // "min_value|max_value|confirmed|numeric|between|digits|required|row_unique|frontJSValidate|mobile", // validateList: [], // dataType: "numeric", // filterthousandBit: "", // filtercurrency: "", // min: 0, // max: 99999, // step: 1, // decimalDigits: 2, // maxDecimalDigits: 0, // mathExp: "", // disabled: false, // controlsPosition: "", // advancedProperty: "inputType|bindPreAndSufFix", // basicsProperty: "number|currency|placeholder|dateCount|numeric", // company: "", //扩展单位配置项, // formulasDiyJs: "", // bindPreAndSufFixjson: { preFix: "", sufSix: "" }, // } // }, // { // ctrlType: "currency", // name: "", // desc: "货币", // icon: "icon-currency", // options: { // width: "100%", // isWidth: true, // required: false, // dataType: "number", // defaultValue: 0, // filterthousandBit: "", // filtercurrency: "", // min: 0, // max: 99999, // step: 1, // decimalDigits: 0, // maxDecimalDigits: 0, // disabled: false, // controlsPosition: "", // mathExp: "", // advancedProperty: "currencyControl", // basicsProperty: "currency|placeholder", // formulasDiyJs: "", // validateType: // "min_value|max_value|confirmed|numeric|between|digits|required|row_unique|frontJSValidate", // validateList: [], // customInput: "", // 自定义默认值 // } // }, // { // ctrlType: 'currency', // name: '', // desc: '货币', // icon: 'icon-huobi', // options: { // width: '100%', // isWidth: true, // required: false, // dataType: 'number', // defaultValue: 0, // filterthousandBit: '', // filtercurrency: '', // min: 0, // max: 99999, // step: 1, // decimalDigits: 0, // maxDecimalDigits: 0, // disabled: false, // controlsPosition: '', // mathExp: '', // advancedProperty: 'currencyControl', // basicsProperty: 'currency|placeholder', // formulasDiyJs: '', // validateType: // 'min_value|max_value|confirmed|numeric|between|digits|required|row_unique|frontJSValidate', // validateList: [], // customInput: '', // 自定义默认值 // labelAlign: '' // } // }, { ctrlType: 'radio', name: '', desc: '单选框', icon: 'icon-danxuankuang', options: { inline: false, defaultValue: '', dataType: 'string|number', showLabel: false, validateType: 'required|row_unique|frontJSValidate', validateList: [], validate: '', options: [ { key: '1', value: '单选1' }, { key: '2', value: '单选2' }, { key: '3', value: '单选3' } ], //单选框的默认选项 required: false, width: '', remote: false, remoteOptions: [], props: { value: 'value', label: 'label' }, remoteFunc: '', disabled: false, advancedProperty: 'isVertical|choiceType|disabled', //高级属性 choiceType: 'static', //默认固定值 customQuery: {}, //动态值对象 bind: [], //绑定的返回值 linkage: [], //联动校验表达式 formulasDiyJs: '', labelAlign: '', customInput: '', custDefaultSelectVal: 'custom', isValidate: true } }, { ctrlType: 'checkbox', name: '', desc: '复选框', icon: 'icon-fuxuankuang', options: { inline: false, dataType: 'string|number', defaultValue: [], showLabel: false, validateType: 'required|row_unique|frontJSValidate', validateList: [], validate: '', options: [ { key: '1', value: '多选1' }, { key: '2', value: '多选2' }, { key: '3', value: '多选3' } ], required: false, width: '', remote: false, remoteOptions: [], props: { value: 'value', label: 'label' }, remoteFunc: '', disabled: false, advancedProperty: 'isVertical|choiceType|disabled', //高级属性 choiceType: 'static', //默认固定值 customQuery: {}, //动态值对象 bind: [], //绑定的返回值 linkage: [], //联动校验表达式 formulasDiyJs: '', checkboxMax: 10, labelAlign: '', customInput: '', custDefaultSelectVal: 'custom', isValidate: true } }, { ctrlType: 'date', name: '', desc: '日期', icon: 'icon-riqi', options: { width: '100%', isWidth: true, defaultValue: '', readonly: false, disabled: false, dataType: 'date', editable: true, clearable: true, placeholder: '', startPlaceholder: '', validateType: 'isAfter|isBefore|isStart|isEnd|required|row_unique|frontJSValidate', validateList: [], validate: '', endPlaceholder: '', type: 'date', inputFormat: 'yyyy-MM-dd', timestamp: false, required: false, basicsProperty: 'date|placeholder', bindPreAndSufFixjson: { preFix: '', sufSix: '' }, advancedProperty: 'bindPreAndSufFix|isInputEdit', formulasDiyJs: '', customInput: '', // 自定义默认值 labelAlign: '', isValidate: true } }, { ctrlType: 'time', name: '', desc: '时间', icon: 'icon-shijian', options: { width: '100%', isWidth: true, defaultValue: '21:19:56', readonly: false, dataType: 'date', disabled: false, editable: true, clearable: true, placeholder: '', startPlaceholder: '', type: 'select', //选择器格式 endPlaceholder: '', isRange: false, arrowControl: true, format: 'HH:mm:ss', inputFormat: 'HH:mm:ss', required: false, basicsProperty: 'time', advancedProperty: 'disabled', formulasDiyJs: '', validateList: [], validate: '', validateType: 'required', labelAlign: '', isValidate: true } }, { ctrlType: 'selector', name: '', desc: '选择器', icon: 'icon-xuanzeqi', options: { width: '100%', isWidth: true, defaultValue: '', validateType: 'required|row_unique|frontJSValidate', validateList: [], validate: '', required: false, dataType: 'string', pattern: '', placeholder: '', disabled: false, limitSelectionRange: false, //限定选择范围 range: { type: '', //过滤类型 orgs: [], //组织范围 policy: '', //策略范围 roles: [] //角色范围 }, selector: { isSingle: false, type: { alias: 'eip-user-selector' } }, //选择器对象 bind: [ { alias: 'eip-user-selector', key: 'id', value: '用户ID' }, { alias: 'eip-user-selector', key: 'account', value: '用户账号' }, { alias: 'eip-user-selector', key: 'fullname', value: '用户姓名' } ], basicsProperty: 'selector', advancedProperty: 'disabled', //高级属性 labelAlign: '', isValidate: true } }, { ctrlType: 'dialog', name: '', desc: '对话框', icon: 'icon-duihuakuang', placeholder: '', options: { validateType: 'required|row_unique|frontJSValidate', validateList: [], validate: '', defaultType: 'String', basicsProperty: 'custDialog|placeholder', advancedProperty: 'disabled', //高级属性 customDialogjson: { name: '请选择', icon: '', custDialog: { selectNum: '', conditions: [], mappingConf: [], custQueryJson: [] }, resultField: [], allowInput: false }, labelAlign: '' } }, { ctrlType: 'select', name: '', desc: '下拉框', isMultiple: false, icon: 'icon-xialakuang', options: { width: '100%', isWidth: true, defaultValue: '', multiple: false, disabled: false, clearable: false, placeholder: '', required: false, showLabel: false, validateType: 'required|row_unique|frontJSValidate', validateList: [], dataType: 'string|number', validate: '', options: [ { key: '1', value: '下拉框1' }, { key: '2', value: '下拉框2' }, { key: '3', value: '下拉框3' } ], remote: false, filterable: false, allowCreate: false, remoteOptions: [], props: { value: 'value', label: 'label' }, remoteFunc: '', basicsProperty: 'selectConfig|choiceType|placeholder', advancedProperty: 'disabled', choiceType: 'static', //默认固定值 customQuery: { custQueryJson: [], valueBind: '', labelBind: '', conditionfield: [] }, //动态值对象 bind: [], //绑定的返回值 linkage: [], //联动校验表达式 formulasDiyJs: '', limitCount: 10, labelAlign: '', customInput: '', custDefaultSelectVal: 'custom', isValidate: true } }, { ctrlType: 'attachment', name: '', desc: '附件', icon: 'icon-fujian', options: { width: '100%', validateType: 'required', validateList: [], validate: '', defaultValue: '', required: false, dataType: 'string', pattern: '', placeholder: '', disabled: false, basicsProperty: 'fileupload', propConf: [ { name: 'prop1' }, { name: 'prop2' }, { name: 'prop3' }, { name: 'prop4' }, { name: 'prop5' }, { name: 'prop6' } ], //附件扩展属性配置 file: { multiple: true, simplicity: true, limit: '5', acceptType: 'any', acceptStr: '', size: '50', allowDownload: false, allowPreview: true, accept: [ 'jpg', 'jpeg', 'png', 'bmp', 'pdf', 'JPG', 'JPEG', 'PNG', 'BMP', 'PDF', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'rtf', 'txt', 'zip', 'rar', 'vsd', 'dwg', 'mp4', 'avi', '3gp', 'rmvb', 'rm', 'wmv' ] }, //文件上传对象 labelAlign: '' } }, // { // ctrlType: "officesign", // name: "", // desc: "office控件", // icon: "icon-document", // options: { // width: "100%", // validateType: "required", // validateList: [], // validate: "", // defaultValue: "", // required: false, // dataType: "string", // pattern: "", // placeholder: "", // disabled: false, // basicsProperty: "officesign", // propConf: [ // { name: "prop1" }, // { name: "prop2" }, // { name: "prop3" }, // { name: "prop4" }, // { name: "prop5" }, // { name: "prop6" } // ], //附件扩展属性配置 // file: { // multiple: true, // simplicity: true, // limit: "5", // acceptType: 'any', // acceptStr: '', // size: '50', // allowDownload: false, // allowPreview: false, // accept: [ // "PDF", // "doc", // "docx", // "xls", // "xlsx", // "ppt", // "pptx" // ] // } //文件上传对象 // } // }, { ctrlType: 'switch', name: '', desc: '开关', icon: 'icon-switch', options: { defaultValue: 'true', activeValue: 'true', inactiveValue: 'false', activeText: '', inactiveText: '', disabled: true, validateType: 'required', validateList: [], validate: '', dataType: 'string|number', formulasDiyJs: '', labelAlign: '', customInput: '', custDefaultSelectVal: 'custom' } }, { ctrlType: 'dic', name: '', desc: '数据字典', icon: 'icon-shujuzidian', options: { defaultValue: '', basicsProperty: 'dicConfig', bind: [], //绑定 dic: '', //字典别名 filterable: false, //字典是否可搜索 advancedProperty: 'disabled', //高级属性 placeholder: '', validateList: [], validate: '', validateType: 'required', dataType: 'string', labelAlign: '' } }, { ctrlType: 'tag', name: '', desc: '标签', icon: 'icon-biaoqian', options: { dataType: 'string', defaultValue: [], lableColor: '', basicsProperty: 'tagConfig', bind: [], //绑定 tag: '', //标签别名 filterable: false, //标签是否可搜索 placeholder: '请选择', expand: false, labelAlign: '' }, isMultiple: true }, { ctrlType: 'rate', name: '', desc: '评分', icon: 'icon-pingfen', options: { dataType: 'number', required: false, validateType: 'row_unique|frontJSValidate', validateList: [], validate: '', defaultValue: 0, width: '', max: 5, allowHalf: false, showScore: true, activeColor: '#F7BA2A', iconClass: '', labelAlign: '' } }, { ctrlType: 'imageViewer', name: '', desc: '图片', icon: 'icon-tupian1', options: { openUrl: '', defaultValue: [], size: {}, isDisplay: false, uploadType: 'local', fileJson: '', tokenFunc: 'funcGetToken', basicsProperty: 'imageViewer', validateType: 'required', validateList: [], validate: '', imgHeight: 200, imgWidth: 200, file: { multiple: true, limit: '3', allowDownload: false, allowPreview: true, compress: false }, labelAlign: '' } }, { ctrlType: 'image', tableName: '', boDefAlias: '', name: '', desc: '背景图片', icon: 'icon-beijingtupian', options: { defaultValue: [], urlType: '1', openUrl: '', size: {}, isDisplay: false, noBindModel: true, imgSrc: '', fileJson: '', tokenFunc: 'funcGetToken', basicsProperty: 'img', labelAlign: '' } }, { ctrlType: 'autocomplete', name: '', desc: '输入建议', icon: 'icon-shurujianyi', options: { dataType: 'string|number', validateType: 'confirmed|email|regex|id_card|min|max|min_value|max_value|isAfter|isBefore|isStart|isEnd|numeric|between|is|digits|mobile|required|row_unique|alpha_spaces|alpha_dash|alpha_num|alpha|frontJSValidate', placeholder: '', defaultValue: '', validateList: [], disabled: false, validate: '', required: false, width: '100%', basicsProperty: 'selectConfig|choiceType', //高级属性 choiceType: 'static', //默认固定值 customQuery: {}, //动态值对象 bind: [], //绑定的返回值 options: [], labelAlign: '' } }, { ctrlType: 'slider', name: '', desc: '滑块', icon: 'icon-huakuai', options: { dataType: 'number', required: false, validateType: 'required|row_unique|frontJSValidate', validateList: [], validate: '', defaultValue: 0, width: '', min: 0, max: 99999, step: 1, numberMax: 99999, numberMin: 0, showInput: false, labelAlign: '' } }, { ctrlType: 'date-picker', name: '', desc: '日期范围', icon: 'icon-riqifanwei', options: { width: '100%', isWidth: true, datePickerType: 'daterange', dataType: 'date', required: false, validateType: 'required|row_unique|frontJSValidate', validateList: [], validate: '', defaultValue: [], type: 'date', labelAlign: '' } }, { ctrlType: 'time-picker', name: '', desc: '时间范围', icon: 'icon-shijianfanwei', options: { width: '100%', isWidth: true, datePickerType: 'datetimerange', dataType: 'date', required: false, validateType: 'required|row_unique|frontJSValidate', validateList: [], validate: '', defaultValue: [], type: 'date', labelAlign: '' } }, // 大标题 { ctrlType: 'big-title', noTitle: true, tableName: '', boDefAlias: '', name: '', desc: '大标题', icon: 'icon-dabiaoti', noTooltip: true, noAdvanced: true, options: { fontSize: '24px', fontWeight: '700', textAlign: 'center', color: '', textValue: '大标题', noBindModel: true, paddingTop: '10px', paddingBottom: '18px', paddingLeft: '', paddingRight: '', hideLabel: true } }, // 小标题 { ctrlType: 'small-title', tableName: '', boDefAlias: '', noTitle: true, name: '', desc: '小标题', icon: 'icon-xiaobiaoti', noTooltip: true, noAdvanced: true, options: { fontSize: '14px', fontWeight: '700', textAlign: 'center', color: '', textValue: '小标题', noBindModel: true, paddingTop: '16px', paddingBottom: '12px', paddingLeft: '16px', paddingRight: '', hideLabel: true } }, // 文字 { ctrlType: 'simple-text', tableName: '', boDefAlias: '', noTitle: true, name: '', desc: '文字', icon: 'icon-single2', noTooltip: true, noAdvanced: true, options: { fontSize: '14px', textAlign: 'center', color: '', textValue: '文字', noBindModel: true, paddingTop: '', paddingBottom: '', paddingLeft: '', paddingRight: '', fontWeight: '400', hideLabel: true } }, { ctrlType: 'richText', name: '', tableName: '', boDefAlias: '', desc: '富文本', icon: 'icon-duohangwenben', options: { width: '100%', isWidth: true, defaultValue: '', dataType: 'string|text', validateList: [], validateType: 'regex|min|max|required|row_unique|frontJSValidate|backendValidate', advancedProperty: 'isEditor|isInputEdit', disabled: false, placeholder: '', basicsProperty: 'placeholder', formulasDiyJs: '', noBindModel: false, customInput: '', customValueBase64: '', labelAlign: '', custDefaultSelectVal: 'custom', isEditor: true } } // { // ctrlType: "identity", // name: "", // desc: "流水号", // icon: "icon-hide", // isLayout: false, // fieldPath: '', // options: { // width: "100%", // isWidth: true, // defaultValue: "", // disabled: true, // placeholder: "", // init: "false", // hideLabel: false // } // } ] export const advanceComponents = [ { ctrlType: 'htCustomComponent', name: '', desc: 'DIY组件', noTitle: true, icon: 'el-icon-menu', noAdvanced: true, options: { noBindModel: true, basicsProperty: 'htCustomComponent', alias: '' } }, { ctrlType: 'button', tableName: '', boDefAlias: '', name: '', desc: '按钮', icon: 'icon-anniu', options: { noBindModel: false, defaultType: 'String', basicsProperty: 'onetextBtn', bindEventjson: { name: '选择', icon: '', isShowInput: true }, formulasDiyJs: '', showPrint: false, labelAlign: '', wordPrintConf: { templateId: '', fileId: '', fileName: '', download: true, templateName: '' } }, noTitle: false, noPlaceholder: false, noTooltip: false }, // { // ctrlType: 'relation', // name: '', // desc: '关联数据', // icon: 'icon-relation', // options: { // validateType: 'required|row_unique|frontJSValidate', // validateList: [], // validate: "", // defaultType: 'String', // basicsProperty:'relation', // customQuery:{valueBind:"",labelBind:"",conditionfield:[]},//动态值对象 // bind:[],//绑定的返回值 // } // }, { ctrlType: 'milepost', name: '', desc: '里程碑', icon: 'icon-lichengbei', noTitle: true, noPlaceholder: true, noTooltip: true, noAdvanced: true, options: { direction: 'horizontal', placeholder: '', defaultValue: '', width: '100%', basicsProperty: 'stepControl', steps: [{ title: '', description: '' }], labelAlign: '' } }, { ctrlType: 'eip-cascader', name: '', desc: '级联', icon: 'icon-jilian', options: { required: false, validateType: 'required|row_unique|frontJSValidate', validateList: [], validate: '', defaultValue: [], width: '', placeholder: '', disabled: false, isValidate: true, clearable: false, remote: true, remoteOptions: [], props: { value: 'value', label: 'label', children: 'children' }, remoteFunc: '', basicsProperty: 'selectConfig|choiceType', advancedProperty: 'disabled', //高级属性 choiceType: 'dynamic', //默认固定值 customQuery: { valueBind: '', labelBind: '', conditionfield: [] }, //动态值对象 bind: [], //绑定的返回值 linkage: [], //联动校验表达式 labelAlign: '' } }, { ctrlType: 'formTable', tableName: '', boDefAlias: '', name: '表单列表', desc: '表单列表', icon: 'icon-form', isLayout: true, templateKey: '', templateId: '', templateObj: {}, templateField: [], options: { showLabel: true, boDefAlias: '', selectList: [], bindList: [], noBindModel: true, labelAlign: '' }, customDialogjson: { name: '表单列表', custDialog: { conditions: [], mappingConf: [] }, resultField: [] }, subtableBackfill: false }, { ctrlType: 'dataView', tableName: '', boDefAlias: '', name: '数据列表', desc: '数据列表', icon: 'icon-property', isLayout: true, dataTemplateObj: [], options: { showLabel: true, noBindModel: true, labelAlign: '' }, customDialogjson: { name: '数据列表', custDialog: { conditions: [], mappingConf: [] }, resultField: [] }, subtableBackfill: false }, // { // ctrlType: "text", // tableName: "", // boDefAlias: "", // name: "", // desc: "文本", // icon: "icon-text", // options: { // defaultValue: "This is a text", // noBindModel: true, // customClass: "", // basicsProperty: "textValue", // isShowBorder: 1, // borderColor: '#d4d4d4' // } // }, { ctrlType: 'QRcode', tableName: '', boDefAlias: '', name: '', desc: '二维码', icon: 'icon-erweima', options: { noBindModel: true, customClass: '', labelAlign: '' } }, // { // ctrlType: 'urlParameter', // name: '', // tableName: '', // desc: 'url参数', // icon: 'icon-single', // options: { // disabled: true, // customInput: '', // custDefaultSelectVal: 'custom', // bindKey: '' // } // }, { ctrlType: 'iframe', tableName: '', boDefAlias: '', name: '', desc: 'iframe', icon: 'icon-iframe1', // noBasics: true, noTitle: true, options: { iframeSrcJs: '', iframeType: 'static', iframeSrc: '', iframeSrcHeight: '300', noBindModel: true, iframeSrcWidth: '100%', frameborder: '0', lableColor: '', basicsProperty: 'iframe', labelAlign: '', isBusinessForm: false, urlParameter: [], returnParameter: [], iframeNmae: 'iframeControl' } }, { ctrlType: 'amap', name: '', desc: '高德地图', icon: 'icon-gaodeditu', options: { width: '100%', defaultValue: '', dataType: 'varchar', noBindModel: false, placeholder: '', heightMap: '350px', widthMap: '100%', showEffect: 'dialog', isAddPosition: true, locationPath: '', locationName: '', labelAlign: '', longitudeName: '', longitudePath: '', latitudeName: '', latitudePath: '', provinceName: '', provincePath: '', cityName: '', cityPath: '', districtName: '', districtPath: '', streetName: '', streetPath: '', } }, { ctrlType: 'tianditu', name: '', desc: '天地图', icon: 'icon-gaodeditu', options: { width: '100%', defaultValue: '', dataType: 'varchar', noBindModel: false, placeholder: '', heightMap: '350px', widthMap: '100%', showEffect: 'dialog', isAddPosition: true, isImage: false, locationPath: '', locationName: '', labelAlign: '', longitudeName: '', longitudePath: '', latitudeName: '', latitudePath: '', provinceName: '', provincePath: '', cityName: '', cityPath: '', districtName: '', districtPath: '', streetName: '', streetPath: '', } }, { ctrlType: 'customChart', tableName: '', boDefAlias: '', name: '', desc: '图表', icon: 'icon-tubiao', noAdvanced: true, noTitle: true, options: { defaultValue: [], chartAlias: '', chartId: '', size: {}, isDisplay: false, noBindModel: true, fileJson: '', selectList: '', customQuery: { valueBind: '', labelBind: '', conditionfield: [] }, //动态值对象 labelAlign: '' } }, { ctrlType: 'dropdown', name: '', desc: '下拉树', icon: 'icon-xialashu', isMultiple: false, options: { defaultValue: '', multiple: false, disabled: false, isValidate: true, clearable: false, placeholder: '', required: false, showLabel: false, validateType: 'required|row_unique|frontJSValidate', validateList: [], validate: '', width: '', options: [], remote: false, filterable: false, allowCreate: false, dataType: 'string|number', remoteOptions: [], props: { value: 'value', label: 'label' }, remoteFunc: '', basicsProperty: 'selectConfig|choiceType|placeholder', advancedProperty: 'disabled', //高级属性 choiceType: 'dynamic', //默认固定值 customQuery: { custQueryJson: [], valueBind: '', labelBind: '', conditionfield: [], treeDataMode: 0, PId:"", pvalue: '', //父ID初始值 }, //动态值对象 bind: [], //绑定的返回值 formulasDiyJs: '', labelAlign: '', limitCount: 10, customInput: '', custDefaultSelectVal: 'custom', } } // { // ctrlType: "approvalHistory", // tableName: "", // boDefAlias: "", // name: "", // desc: "审批历史", // icon: "icon-shenpilishi", // options: { // required: false, // validateType: "required|row_unique|frontJSValidate", // validateList: [], // validate: "", // defaultValue: [], // width: "", // isDisplay: false, // noBindModel: true, // hideCtrl: false // } // }, // { // ctrlType: "contractPreview", // name: "", // desc: "合同预览", // icon: "icon-iframe", // noBasics: true, // options: { // iframeSrc: "", // iframeSrcHeight: "500", // noBindModel: true, // iframeSrcWidth: "100%", // frameborder: "1", // lableColor: "", // basicsProperty: "contract" // } // } ] export const layoutComponents = [ { ctrlType: 'page', name: '', desc: '分页布局', icon: 'icon-fenyebuju', isLayout: true, columns: [ { list: [] } ] }, { ctrlType: 'tab', name: '', desc: 'tab布局', icon: 'icon-tabbuju', isLayout: true, columns: [ { span: '标签页1', list: [], permission: '', permissionPath: '' }, { span: '标签页2', list: [], permission: '', permissionPath: '' }, { span: '标签页3', list: [], permission: '', permissionPath: '' } ], options: { gutter: 0, nextCheck: '', type: '', //风格类型 justify: 'start', align: 'top' } }, { ctrlType: 'accordion', name: '', desc: '折叠面板', icon: 'icon-zhediemianban', isLayout: true, columns: [ { span: '折叠面板', idKey: Date.parse(new Date()) + 'a', isOpen: false, permission: '', permissionPath: '', list: [] } ], options: { gutter: 0, justify: 'start', nextCheck: '', accordion: 'false', activeNames: [], align: 'top' } }, { ctrlType: 'grid', name: '', desc: '栅格布局', icon: 'icon-zhagebuju', isLayout: true, columns: [ { span: 12, list: [] }, { span: 12, list: [] } ], options: { gutter: 0, justify: 'start', align: 'top', aBorder: 'wkx', gridDescBagColor: '#f9f9f9', gridDescColor: '#262626', lableColor: '#DCDEE0', gridDescJustify: 'left', gridDescBold: "bolder", hideLabel: false , lineType:'solid1px' } }, { ctrlType: 'table', name: '', desc: '表格布局', icon: 'icon-biaogebuju', isLayout: true, rows: [ { cols: [ { colspan: 1, list: [] }, { colspan: 1, list: [] } ] }, { cols: [ { colspan: 1, list: [] }, { colspan: 1, list: [] } ] }, { cols: [ { colspan: 1, list: [] }, { colspan: 1, list: [] } ] } ], options: { gutter: 0, justify: 'start', align: 'top', lineHeight: 40, borderColor: '#ebeef5', borderWidth: 1, fontColor: '', labelWidthType: 'percent', //percent:百分比,px:像素 labelWidth: 30, titleBackground: '#f4f4f4' // 标题背景色 } }, { ctrlType: 'subtable', name: '子表', desc: '子表', icon: 'icon-biaogebuju', isLayout: true, customHeader: '', list: [], options: { showLabel: true, boSubEntity: '', subTablePath: '', relation: '', maxRow: 0 }, customQuery: { isUse: false, resultfield: [] }, customDialogjson: { name: '子表回填', icon: '', custDialog: { conditions: [], mappingConf: [] }, orgConfig: { name: '', code: '', id: '' }, resultField: [] }, subtableBackfill: false, initTemplateData: false, initTemplateDataType: 'empty' }, { ctrlType: 'subDiv', name: 'div子表', desc: 'div子表', icon: 'icon-biaogebuju', isLayout: true, customHeader: '', list: [], options: { showLabel: true, boSubEntity: '', subTablePath: '', subDivTablePath: '', relation: '', maxRow: 0, dataExpand: 'expand' // 展开expand 折叠 collapse }, customQuery: { isUse: false, resultfield: [] }, customDialogjson: { name: '子表回填', icon: '', custDialog: { conditions: [], mappingConf: [] }, orgConfig: { name: '', code: '', id: '' }, resultField: [] }, subtableBackfill: false, initTemplateData: false, initTemplateDataType: 'empty' }, { ctrlType: 'suntable', name: '孙表', desc: '孙表', icon: 'icon-biaogebuju', isLayout: true, customHeader: '', list: [], options: { showLabel: true, boSubEntity: '', subTablePath: '', relation: '', maxRow: 0 }, customDialogjson: { name: '孙表回填', icon: '', custDialog: { conditions: [], mappingConf: [] }, resultField: [] }, subtableBackfill: false }, { ctrlType: 'sunDiv', name: 'div孙表', desc: 'div孙表', icon: 'icon-biaogebuju', isLayout: true, customHeader: '', list: [], options: { showLabel: true, boSubEntity: '', subTablePath: '', relation: '', maxRow: 0, dataExpand: 'expand' // 展开expand 折叠 collapse }, customDialogjson: { name: '孙表回填', icon: '', custDialog: { conditions: [], mappingConf: [] }, resultField: [] }, subtableBackfill: false }, // { // ctrlType: 'hottable', // name: 'hotTable', // desc: 'hotTable', // icon: 'icon-biaogebuju', // isLayout: true, // showTitle: true, // customHeader: '', // list: [], // options: { // showLabel: true, // boSubEntity: '', // subTablePath: '', // relation: '', // colHeadersRelations: [], //表头数据 // templateContent: {}, // initFillbackData: [], // height: 80, // crossMapping: [], //跨表取数 // nestedHeaders: [], //嵌套表头 // mainTableCalcs: [], //主表字段统计 // cellCalcs: [], //单元格计算公式 // initSumRowField: '', //统计行标签字段 // initSumRowValue: '' //统计行标签字段值 // }, // customDialogjson: { // name: '子表回填', // icon: '', // custDialog: {conditions: [], mappingConf: []}, // resultField: [], // orgConfig: {name: '', code: '', id: ''} // }, // subtableBackfill: false, // initTemplateData: false, // initTemplateDataType: 'empty', // addInitTemplateData: false, //允许添加初始化数据 // addInitBtnName: '添加初始化数据', //添加初始化数据按钮 // initSumRow: false //初始化统计行 // }, { ctrlType: 'divider', isLayout: true, noTitle: true, name: '分割线', desc: '分割线', icon: 'el-icon-minus', options: { customDialogjson: { icon: '' }, basicsProperty: 'divider', noBindModel: true, customClass: '', position: 'center', content: '', color: '#DCDFE6' } } ] export const flowComponents = [ { ctrlType: 'related-process', name: '', desc: '相关流程', icon: 'icon-xiangguanliucheng', options: { defaultType: 'String', basicsProperty: 'isPaging', isPaging: true, //是否分页 pageSize: 10, //默认分页大小 labelAlign: '', flowRange: [], // 流程选择范围 flowRangeKey: '' } }, // { // ctrlType: 'flowChart', // tableName: '', // boDefAlias: '', // name: '', // desc: '流程图', // icon: 'icon-liuchengtu', // options: { // required: false, // validateType: 'required|row_unique|frontJSValidate', // validateList: [], // validate: '', // defaultValue: [], // width: '', // isDisplay: false, // noBindModel: true, // hideCtrl: false // } // }, { ctrlType: 'opinion', tableName: '', boDefAlias: '', name: '', desc: '审批意见', icon: 'icon-shenpiyijian', options: { width: '100%', defaultValue: '', dataType: 'string|text', disabled: true, noBindModel: true, labelAlign: '' } }, { ctrlType: 'signature', name: '', desc: '审批签章', icon: 'icon-shenpiqianzhang', options: { required: false, validateType: 'required|row_unique|frontJSValidate', validateList: [], validate: '', defaultValue: [], width: '', maxPeople: 10, labelAlign: '' } }, { ctrlType: 'processForecast', name: '', desc: '审批预测', icon: 'icon-shenpiyuce', boDefAlias: '', noAdvanced: true, options: { width: 0, height: 0, defaultValue: '', dataType: '', disabled: true, noBindModel: true, basicsProperty: 'processForecast', labelAlign: '', showType: '1' //显示图片2||文字1 } }, //手动签章 { ctrlType: 'handSignature', name: '', desc: '手动签章', icon: 'icon-shenpiqianzhang', options: { required: false, validateType: 'required|row_unique|frontJSValidate', validateList: [], validate: '', defaultValue: [], width: '', maxPeople: 10, labelAlign: '', penColor: '', //画笔颜色 backgroundColor: '' //手写签名墙背景颜色 } }, { ctrlType: 'historicalApproval', tableName: '', name: '', desc: '审批历史', noTitle: true, icon: 'el-icon-menu', noAdvanced: true, options: { noBindModel: true, basicsProperty: 'historicalApproval', order: false, isBusinessForm: false } } ] export const validateRules = [ { key: 'confirmed', isInput: true, isBoData: true, type: 'string|number|text|date', inputType: 'select', //输入框类型 name: '相同的值' }, { key: 'email', name: '电子邮箱' }, { key: 'regex', isInput: true, inputType: 'input', //输入框类型 name: '*正则表达式' }, { key: 'id_card', name: '身份证号码' }, { key: 'min', isInput: true, inputType: 'input', //输入框类型 name: '*最小文本长度' }, { key: 'max', isInput: true, inputType: 'input', //输入框类型 name: '*最大文本长度' }, { key: 'min_value', isInput: true, inputType: 'input', //输入框类型 name: '最小数值' }, { key: 'max_value', isInput: true, inputType: 'input', //输入框类型 name: '最大数值' }, { key: 'isAfter', isInput: true, inputType: 'select', //输入框类型 type: 'date', name: '日期晚于' }, { key: 'isBefore', isInput: true, inputType: 'select', //输入框类型 type: 'date', name: '日期早于' }, { key: 'isStart', isInput: true, inputType: 'select', //输入框类型 type: 'date', name: '日期不早于' }, { key: 'isEnd', isInput: true, inputType: 'select', //输入框类型 type: 'date', name: '日期不晚于' }, { key: 'numeric', name: '整数' }, { key: 'between', isInput: true, inputType: 'twoInput', //输入框类型 name: '指定范围的数字(包含最小/大值)' }, { key: 'is', isInput: true, inputType: 'input', //输入框类型 name: '*指定的值' }, { key: 'digits', isInput: true, inputType: 'input', //输入框类型 name: '指定位数的数字' }, { key: 'mobile', name: '手机号码' }, { key: 'required', name: '*必填' }, //{ // isInput: true, // key: "row_unique", // name: "*行唯一" //}, { key: 'alpha_spaces', name: '字母空格' }, { key: 'alpha_dash', name: '字母数字横线下划线' }, { key: 'alpha_num', name: '字母数字' }, { key: 'alpha', name: '字母' }, { key: 'frontJSValidate', isInput: true, inputType: 'button', //输入框类型 name: 'JS方法校验' }, { key: 'backendValidate', isInput: true, inputType: 'input', //输入框类型 name: '后端校验' }, { key: 'decimal', inputType: 'input', //输入框类型 name: '数字' } // { // key: "uniqueValidate", // name: "唯一性校验" // } ] export default { isLayoutComponents(type) { if ( type == 'tab' || type == 'subtable' || type == 'subDiv' || type == 'accordion' || type == 'page' || type == 'grid' || type == 'dataView' || type == 'formTable' || type == 'table' ) { return true } return false }, isGridLayoutComponents(type) { if ( type == 'tab' || type == 'accordion' || type == 'page' || type == 'sunDiv' || type == 'suntable' ) { return true } return false }, handleLayoutComponents(vueInst, layoutRow, fieldList, newFieldIndex) { //针对字段拖入的校验 if (layoutRow && fieldList && fieldList[newFieldIndex]) { let field = fieldList[newFieldIndex] if (!this.validateLayoutField(vueInst, layoutRow, field)) { fieldList.splice(newFieldIndex, 1) return false } } let this_ = vueInst let isPass = true vueInst.data.list.forEach(l => { if (this.isLayoutComponents(l.ctrlType)) { if (l.columns) { l.columns.forEach(c => { if (c.list) { c.list = c.list.filter(element => { if ( l.ctrlType == 'tab' || l.ctrlType == 'accordion' || l.ctrlType == 'subtable' ) { if ( this.isGridLayoutComponents(element.ctrlType) && !(l.ctrlType == 'accordion' && element.ctrlType == 'tab') ) { if ((element.ctrlType == 'sunDiv' || element.ctrlType == 'suntable')) { this_.$message.warning('孙表只能存在子表中') } else { this_.$message.warning('布局字段中不允许再拖入布局字段') } isPass = false return false } } else { if ( ['grid', 'table', 'accordion', 'tab',].includes(l.ctrlType) && (element.ctrlType == 'sunDiv' || element.ctrlType == 'suntable') ) { this_.$message.warning('孙表只能存在子表中') isPass = false return false } if (this.isLayoutComponents(element.ctrlType)) { this_.$message.warning('布局字段中不允许再拖入布局字段') isPass = false return false } if (l.ctrlType == 'grid' && element.ctrlType == 'hottable') { this_.$message.warning('布局字段中不允许再拖入布局字段') isPass = false return false } } return true }) } }) } else if (l.list) { if (l.ctrlType == 'subDiv') { l.list = l.list.filter(c => { if (this.isLayoutComponents(c.ctrlType) && c.ctrlType != 'grid') { this_.$message.warning('布局字段中不允许再拖入布局字段') isPass = false return false } return true }) } else { l.list = l.list.filter(c => { if (this.isLayoutComponents(c.ctrlType)) { this_.$message.warning('布局字段中不允许再拖入布局字段') isPass = false return false } return true }) } } else if (l.rows) { // 表格布局 l.rows.forEach(row => { row.cols.forEach(col => { col.list = col.list.filter(c => { if ( this.isLayoutComponents(c.ctrlType) || c.ctrlType == 'sunDiv' || c.ctrlType == 'suntable' || c.ctrlType == 'divider' ) { if ((c.ctrlType == 'sunDiv' || c.ctrlType == 'suntable')) { this_.$message.warning('孙表只能存在子表中') } else { this_.$message.warning('布局字段中不允许再拖入布局字段') } isPass = false return false } return true }) }) }) } } }) //布局字段中不允许再拖入布局字段时还原上传控件的顺序 if (!isPass && window.panelList) { vueInst.data.list = window.panelList } window.panelList = '' return isPass }, validateLayoutField(vueInst, layout, field) { //这里的校验只针对字段属性拖入和快速复用拖入的 let _this = this if (field && (field.dragType == 'field' || field.dragType == 'copy')) { if ( field.fieldPath.split('.').length == 2 && field.fieldPath.indexOf('item.') != 0 ) { //主表字段 if ( layout.parentNodeType == 'sub' || layout.ctrlType == 'subtable' || layout.ctrlType == 'subDiv' ) { vueInst.$message.warning('子表布局中不允许拖入主表字段。') return false } else if ( layout.parentNodeType == 'sun' || layout.ctrlType == 'suntable' || layout.ctrlType == 'sunDiv' ) { vueInst.$message.warning('孙表布局中不允许拖入主表字段。') return false } } else if ( field.fieldPath.split('.').length == 2 && field.fieldPath.indexOf('item.') == 0 ) { //子表字段 if ( (layout.ctrlType == 'subtable' || layout.ctrlType == 'subDiv') && !layout.options.boSubEntity ) { vueInst.$message.warning('请先绑定子表。') return false } else if ( !layout.parentNodeType && !(layout.ctrlType == 'subtable' || layout.ctrlType == 'subDiv') ) { vueInst.$message.warning('主表布局中不允许拖入子表字段。') return false } else if (layout.parentNodeType == 'sun') { vueInst.$message.warning('孙表布局中不允许拖入子表字段。') return false } else if ( layout.options.boSubEntity && layout.options.boSubEntity != field.tableName ) { vueInst.$message.warning( '子表布局绑定的BO实体与拖入字段所属BO实体不一致。' ) return false } } else if (field.fieldPath.split('.').length == 4) { //孙表字段 if ( (layout.ctrlType == 'suntable' || layout.ctrlType == 'sunDiv') && !layout.options.boSubEntity ) { vueInst.$message.warning('请先绑定孙表。') return false } else if (!layout.parentNodeType && layout.ctrlType === 'table') { vueInst.$message.warning('主表布局中不允许拖入孙表字段。') return false } else if ( field.parentNodeType == 'sun' && !(layout.ctrlType == 'suntable' || layout.ctrlType == 'sunDiv') && layout.parentNodeType != 'sun' ) { vueInst.$message.warning('子表布局中不允许拖入孙表字段。') return false } else if ( layout.options.boSubEntity && layout.options.boSubEntity != field.tableName ) { vueInst.$message.warning( '孙表布局绑定的BO实体与拖入字段所属BO实体不一致。' ) return false } } } return true } }