| | |
| | | datemonth: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'splitline', 'marginTop', 'marginBottom'], |
| | | datetime: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'marginTop', 'marginBottom', 'minDate', 'maxDate'], |
| | | textarea: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'span', 'labelwidth', 'maxRows', 'encryption', 'interception', 'tooltip', 'extra', 'count', 'placeholder', 'marginTop', 'marginBottom', 'enterReplace'], |
| | | cascader: ['readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom', 'separator', 'fillField'], |
| | | color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'marginTop', 'marginBottom'], |
| | | rate: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'splitline', 'tooltip', 'extra', 'marginTop', 'marginBottom', 'allowHalf', 'rateCount', 'character', 'place'], |
| | | hint: ['label', 'field', 'type', 'blacklist', 'message', 'span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'], |
| | |
| | | } |
| | | } |
| | | |
| | | if (type === 'cascader') { |
| | | if (this.record.resourceType === '0') { // 自定义资源 |
| | | shows.push('options', 'topmark') |
| | | } else if (this.record.resourceType === '1') { // 数据源 |
| | | shows.push('dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'disableField', 'database', 'topmark', 'linkField') |
| | | } |
| | | reTypes.linkField = 'text' |
| | | reTooltip.linkField = '用于构建数据结构。' |
| | | reOptions.resourceType = [{ |
| | | value: '0', |
| | | text: '自定义' |
| | | }, { |
| | | value: '1', |
| | | text: '数据源' |
| | | }, { |
| | | value: '2', |
| | | text: '省市区' |
| | | }] |
| | | } else { |
| | | reTooltip.linkField = '' |
| | | reTypes.linkField = 'select' |
| | | reOptions.resourceType = [{ |
| | | value: '0', |
| | | text: '自定义' |
| | | }, { |
| | | value: '1', |
| | | text: '数据源' |
| | | }] |
| | | } |
| | | |
| | | if (['multiselect', 'checkbox'].includes(type)) { |
| | | reTooltip.initval = '添加多个初始值请使用逗号分隔。' |
| | | } else if (['select', 'link', 'radio'].includes(type)) { |
| | |
| | | if (value === 'linkMain') { |
| | | this.record.hidden = 'true' |
| | | _fieldval.hidden = 'true' |
| | | } |
| | | |
| | | if (this.record.type === 'cascader' && value !== 'cascader') { |
| | | this.record.linkField = '' |
| | | _fieldval.linkField = '' |
| | | |
| | | if (this.record.resourceType === '2') { |
| | | this.record.resourceType = '0' |
| | | _fieldval.resourceType = '0' |
| | | } |
| | | } |
| | | |
| | | if (this.record.options.length > 0) { |
| | |
| | | |
| | | if (item.type === 'text') { |
| | | rules = [ |
| | | { required: item.required, message: dict['form.required.input'] + item.label + '!' } |
| | | { required: item.required, message: dict['form.required.input'] + item.label + '!' }, |
| | | { |
| | | pattern: /^[^']*$/ig, |
| | | message: '不可使用英文状态的单引号!' |
| | | } |
| | | ] |
| | | if (item.key === 'field') { |
| | | rules.push({ |
| | |
| | | } |
| | | if (type === 'radio' && this.record.linkField) { |
| | | type = 'link' |
| | | } else if (type === 'cascader') { |
| | | type = 'link' |
| | | } |
| | | content = <EditTable type={type} module="form" transfield={transfield} linkSubFields={linkSubFields} onChange={this.changeOptions}/> |
| | | } else { |