| | |
| | | "display": "standalone", |
| | | "theme_color": "#000000", |
| | | "background_color": "#ffffff", |
| | | "mk_version": "20230712" |
| | | "mk_version": "20231201" |
| | | } |
| | |
| | | |
| | | class FileUpload extends Component { |
| | | static propTpyes = { |
| | | config: PropTypes.object, // 表单信息 |
| | | onChange: PropTypes.func, // 表单变化 |
| | | data: PropTypes.any, |
| | | config: PropTypes.object, |
| | | onChange: PropTypes.func, |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | const { config } = this.props |
| | | const { config, data } = this.props |
| | | |
| | | let filelist = [] |
| | | if (config.initval) { |
| | |
| | | }) |
| | | } catch (e) { |
| | | filelist = [] |
| | | } |
| | | |
| | | if (data && config.subFields && config.subFields.length === 1 && filelist.length === 1) { |
| | | if (data[config.subFields[0].field]) { |
| | | filelist[0].name = data[config.subFields[0].field] |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | percent: 0 |
| | | }) |
| | | |
| | | let file_name = file.name.replace(/\.{1}[^.]*$/ig, '') |
| | | let file_name = file.name |
| | | |
| | | if (compress === 'true' || compress === 'base64') { |
| | | let reader = new FileReader() |
| | |
| | | display: none; |
| | | } |
| | | } |
| | | .ant-upload-list-item-card-actions { |
| | | opacity: 1; |
| | | } |
| | | } |
| | | .fileupload-form-container.limit-fileupload { |
| | | > .ant-upload { |
| | |
| | | } else if (item.type === 'fileupload') { |
| | | className = item.readonly ? 'readonly' : '' |
| | | className += item.fileType === 'picture-card' ? ' file-upload' : '' |
| | | content = (<MKFileUpload config={item} onChange={(val, other = {}) => this.recordChange({[item.field]: val, ...other})} />) |
| | | content = (<MKFileUpload config={item} data={this.record} onChange={(val, other = {}) => this.recordChange({[item.field]: val, ...other})} />) |
| | | } else if (item.type === 'textarea') { |
| | | content = (<MKTextArea config={item} onChange={(val, defer) => !defer && this.recordChange({[item.field]: val})}/>) |
| | | } else if (item.type === 'rate') { |
| | |
| | | |
| | | let _insert = '' |
| | | if (btn.default !== 'false') { |
| | | let _fields = [] |
| | | btn.columns.forEach(col => { |
| | | if (col.import === 'false' || col.import === 'init') return |
| | | |
| | | _fields.push(col.Column) |
| | | }) |
| | | |
| | | _fields = _fields.join(',') |
| | | |
| | | _insert = ` |
| | | /* 默认sql */ |
| | | Insert into ${database}${sheet} (${fields},createuserid,createuser,createstaff,bid) |
| | | Select ${fields},'${sessionStorage.getItem('UserID') || ''}',@username,@fullname,'${BID}' From #${sheet} |
| | | Insert into ${database}${sheet} (${_fields},createuserid,createuser,createstaff,bid) |
| | | Select ${_fields},'${sessionStorage.getItem('UserID') || ''}',@username,@fullname,'${BID}' From #${sheet} |
| | | ` |
| | | } |
| | | |
| | |
| | | config.components = this.resetSyncQuery(config.components) |
| | | } |
| | | |
| | | if (config.MenuID === 'home_page_id') { |
| | | config.permission = 'false' |
| | | } |
| | | |
| | | let tbs = [] |
| | | let btns = this.getMenuMessage(config, tbs) |
| | | let arr = [] |