| | |
| | | _card.subcards[0].setting.align = _card.wrap.align |
| | | _card.subcards[0].setting.enable = _card.wrap.enable |
| | | _card.subcards[0].setting.verticalSpace = _card.wrap.verticalSpace |
| | | _card.subcards[0].subButton.enable = _card.wrap.enable |
| | | |
| | | if (_card.wrap.closeEnable === 'true' && !_card.subcards[0].closeButton) { |
| | | _card.subcards[0].closeButton = {label: '关闭', enable: 'true', type: 'close', style: {backgroundColor: '#ffffff', color: 'rgba(0,0,0,0.65)', borderColor: '#d9d9d9', borderWidth: '1px', paddingLeft: '25px', paddingRight: '25px', paddingTop: '5px', paddingBottom: '5px', marginLeft: '10px'}} |
| | |
| | | |
| | | pasteSubmit = () => { |
| | | let appType = sessionStorage.getItem('appType') |
| | | let options = ['datacard', 'propcard', 'balcony', 'timeline', 'simpleform', 'stepform', 'tabform', 'normaltable', 'tablecard', 'editor', 'line', 'bar', 'pie', 'scatter', 'sandbox'] |
| | | let options = ['datacard', 'propcard', 'balcony', 'timeline', 'simpleform', 'stepform', 'tabform', 'basetable', 'normaltable', 'tablecard', 'editor', 'line', 'bar', 'pie', 'scatter', 'sandbox'] |
| | | let types = { |
| | | login: '登录', |
| | | navbar: '导航栏', |
| | |
| | | return |
| | | } |
| | | |
| | | if (res.copyType === 'basetable') { |
| | | res.copyType = 'normaltable' |
| | | res.subtype = 'normaltable' |
| | | } |
| | | |
| | | res = MenuUtils.resetComponentConfig(res, appType) |
| | | |
| | | delete res.copyType |
| | |
| | | pasteSubmit = () => { |
| | | const { Tab } = this.props |
| | | let appType = sessionStorage.getItem('appType') |
| | | let options = ['tabs', 'group', 'datacard', 'propcard', 'timeline', 'balcony', 'normaltable', 'mainsearch', 'simpleform', 'stepform', 'tabform', 'editor', 'tablecard', 'line', 'bar', 'pie', 'scatter', 'sandbox'] |
| | | let options = ['tabs', 'group', 'datacard', 'propcard', 'timeline', 'balcony', 'basetable', 'normaltable', 'mainsearch', 'simpleform', 'stepform', 'tabform', 'editor', 'tablecard', 'line', 'bar', 'pie', 'scatter', 'sandbox'] |
| | | let types = { |
| | | login: '登录', |
| | | navbar: '导航栏', |
| | |
| | | return |
| | | } |
| | | |
| | | if (res.copyType === 'basetable') { |
| | | res.copyType = 'normaltable' |
| | | res.subtype = 'normaltable' |
| | | } |
| | | |
| | | res = this.resetconfig(res, appType) |
| | | |
| | | delete res.copyType |
| | |
| | | } |
| | | |
| | | if (window.GLOB.debugger === true) { |
| | | console.info('%c' + btn.logLabel + '(回调)', 'color: blue') |
| | | console.info(sql.replace(/\n\s{8}/ig, '\n')) |
| | | } |
| | | |
| | |
| | | import { Upload, Button, Progress, notification } from 'antd' |
| | | import { UploadOutlined } from '@ant-design/icons' |
| | | import SparkMD5 from 'spark-md5' |
| | | |
| | | import Api from '@/api' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import './index.scss' |
| | | |
| | | class FileUpload extends Component { |
| | |
| | | this.props.onChange(vals.join(',')) |
| | | } |
| | | |
| | | onUpdate = (url) => { |
| | | onUpdate = (url, file_name) => { |
| | | const { config } = this.props |
| | | |
| | | let filelist = fromJS(this.state.filelist).toJS() |
| | | |
| | | if (filelist[filelist.length -1]) { |
| | |
| | | }) |
| | | |
| | | this.setState({filelist}) |
| | | this.props.onChange(vals.join(',')) |
| | | |
| | | if (config.subFields) { |
| | | let other = {} |
| | | config.subFields.forEach((n, i) => { |
| | | other[n.field] = file_name |
| | | setTimeout(() => { |
| | | MKEmitter.emit('mkFC', 'input', n.uuid, file_name) |
| | | }, i * 5) |
| | | }) |
| | | |
| | | this.props.onChange(vals.join(','), other) |
| | | } else { |
| | | this.props.onChange(vals.join(',')) |
| | | } |
| | | } |
| | | |
| | | onFail = (msg) => { |
| | |
| | | }) |
| | | } |
| | | |
| | | shardupload = (param) => { |
| | | shardupload = (param, file_name) => { |
| | | let form = new FormData() |
| | | |
| | | form.append('file', param.binary) |
| | |
| | | Api.getLargeFileUpload(form).then(res => { |
| | | if (res.status) { |
| | | if (res.urlPath) { |
| | | this.onUpdate(res.urlPath) |
| | | this.onUpdate(res.urlPath, file_name) |
| | | } else { |
| | | this.onFail() |
| | | } |
| | |
| | | percent: 0 |
| | | }) |
| | | |
| | | let file_name = file.name.replace(/\.{1}[^.]*$/ig, '') |
| | | |
| | | if (compress === 'true' || compress === 'base64') { |
| | | let reader = new FileReader() |
| | | let fileSize = file.size / 1024 / 1024 |
| | |
| | | let param = {Base64Img: cvs.toDataURL('image/jpeg', compressRate)} |
| | | |
| | | if (this.props.config.compress === 'base64') { |
| | | this.onUpdate(param.Base64Img) |
| | | this.onUpdate(param.Base64Img, file_name) |
| | | |
| | | this.setState({ |
| | | percent: 100 |
| | |
| | | url = rduri.replace(/webapi(.*)$/, '') + result.Images |
| | | } |
| | | |
| | | this.onUpdate(url) |
| | | this.onUpdate(url, file_name) |
| | | |
| | | this.setState({ |
| | | percent: 100 |
| | |
| | | if (res.status) { |
| | | if (res.urlPath) { |
| | | let path = (/^\/\//.test(res.urlPath) ? 'https:' : '') + res.urlPath |
| | | this.onUpdate(path) |
| | | this.onUpdate(path, file_name) |
| | | this.setState({ |
| | | percent: 100 |
| | | }, () => { |
| | |
| | | |
| | | Api.getFilePreUpload(_param).then(res => { |
| | | if (res.status && res.urlPath) { |
| | | this.onUpdate(res.urlPath) |
| | | this.onUpdate(res.urlPath, file_name) |
| | | this.setState({ |
| | | percent: 100 |
| | | }, () => { |
| | |
| | | }, 200) |
| | | }) |
| | | } else { |
| | | this.shardupload(param) |
| | | this.shardupload(param, file_name) |
| | | } |
| | | }) |
| | | } |
| | |
| | | let item = fieldMap.get(cell.field) |
| | | |
| | | // 下级表单控制-字段写入 |
| | | if ((['select', 'radio', 'link'].includes(item.type) || (item.type === 'checkcard' && item.multiple !== 'true') || (item.type === 'cascader' && item.resourceType !== '2')) && item.linkSubField) { |
| | | item.subFields = [] |
| | | item.linkSubField.forEach(m => { |
| | | let n = fieldMap.get(m) |
| | | if (n && ['text', 'number', 'textarea'].includes(n.type)) { |
| | | item.subFields.push({ |
| | | uuid: n.uuid, |
| | | field: m |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | if (item.subFields.length === 0) { |
| | | item.subFields = null |
| | | } else if (item.oriOptions.length > 0) { |
| | | item.oriOptions = item.oriOptions.map(cell => { |
| | | item.subFields.forEach(m => { |
| | | cell[m.field] = cell[m.field] === undefined ? '' : cell[m.field] |
| | | }) |
| | | return cell |
| | | if (item.linkSubField && item.linkSubField.length > 0) { |
| | | if ((['select', 'radio', 'link'].includes(item.type) || (item.type === 'checkcard' && item.multiple !== 'true') || (item.type === 'cascader' && item.resourceType !== '2'))) { |
| | | item.subFields = [] |
| | | item.linkSubField.forEach(m => { |
| | | let n = fieldMap.get(m) |
| | | if (n && ['text', 'number', 'textarea'].includes(n.type)) { |
| | | item.subFields.push({ |
| | | uuid: n.uuid, |
| | | field: m |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | item.options = fromJS(item.oriOptions).toJS() |
| | | } |
| | | item.linkSubField = null |
| | | } else if (item.type === 'switch' && item.linkSubField) { |
| | | item.options = [] |
| | | item.subFields = [] |
| | | item.linkSubField.forEach(m => { |
| | | let n = fieldMap.get(m) |
| | | if (n && ['text', 'number', 'textarea'].includes(n.type)) { |
| | | item.subFields.push({ |
| | | uuid: n.uuid, |
| | | field: m |
| | | |
| | | if (item.oriOptions.length > 0) { |
| | | item.oriOptions = item.oriOptions.map(cell => { |
| | | item.subFields.forEach(m => { |
| | | cell[m.field] = cell[m.field] === undefined ? '' : cell[m.field] |
| | | }) |
| | | return cell |
| | | }) |
| | | |
| | | item.options = fromJS(item.oriOptions).toJS() |
| | | } |
| | | }) |
| | | |
| | | if (item.subFields.length === 0) { |
| | | item.subFields = null |
| | | } else { |
| | | } else if (item.type === 'switch') { |
| | | item.options = [] |
| | | item.subFields = [] |
| | | item.linkSubField.forEach(m => { |
| | | let n = fieldMap.get(m) |
| | | if (n && ['text', 'number', 'textarea'].includes(n.type)) { |
| | | item.subFields.push({ |
| | | uuid: n.uuid, |
| | | field: m |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | reFieldsVal = reFieldsVal || {} |
| | | |
| | | let val = item.initval === item.openVal ? item.openText : item.closeText |
| | |
| | | item.subFields.forEach(n => { |
| | | reFieldsVal[n.field] = val || '' |
| | | }) |
| | | } else if (item.type === 'fileupload') { |
| | | item.options = [] |
| | | item.subFields = [] |
| | | item.linkSubField.forEach(m => { |
| | | let n = fieldMap.get(m) |
| | | if (n && ['text', 'number', 'textarea'].includes(n.type)) { |
| | | item.subFields.push({ |
| | | uuid: n.uuid, |
| | | field: m |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | item.linkSubField = null |
| | | } |
| | | |
| | |
| | | } else if (item.type === 'fileupload') { |
| | | className = item.readonly ? 'readonly' : '' |
| | | className += item.fileType === 'picture-card' ? ' file-upload' : '' |
| | | content = (<MKFileUpload config={item} onChange={(val) => this.recordChange({[item.field]: val})} />) |
| | | content = (<MKFileUpload config={item} 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') { |
| | |
| | | type: 'multiselect', |
| | | key: 'linkSubField', |
| | | label: '填充表单', |
| | | tooltip: '在切换选项时会把信息自动填入关联的表单(文本或数字表单)中,开关会将提示文本填入此表单。', |
| | | tooltip: '在切换选项时会把信息自动填入关联的表单(文本或数字表单)中,开关会将提示文本填入此表单,文件上传会将原文件名填入此表单。', |
| | | initVal: card.linkSubField || [], |
| | | options: inputfields |
| | | options: inputfields, |
| | | allowClear: true |
| | | }, |
| | | // { |
| | | // type: 'number', |
| | |
| | | checkcard: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'span', 'labelwidth', 'display', 'tooltip', 'extra', 'place', 'width', 'multiple', 'splitline', 'marginTop', 'marginBottom'], |
| | | multiselect: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'marginTop', 'marginBottom', 'dropdown'], |
| | | link: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'declare', 'setAll', 'linkField', 'linkSubField', 'span', 'place', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom', 'pickerMode'], |
| | | fileupload: ['readonly', 'required', 'hidden', 'readin', 'fieldlength', 'maxfile', 'fileType', 'span', 'labelwidth', 'tooltip', 'extra', 'compress', 'miniSet', 'splitline', 'marginTop', 'marginBottom', 'maxSize'], |
| | | fileupload: ['readonly', 'required', 'hidden', 'readin', 'fieldlength', 'maxfile', 'fileType', 'span', 'labelwidth', 'linkSubField', 'tooltip', 'extra', 'compress', 'miniSet', 'splitline', 'marginTop', 'marginBottom', 'maxSize'], |
| | | switch: ['initval', 'openVal', 'closeVal', 'openText', 'closeText', 'readonly', 'hidden', 'readin', 'span', 'labelwidth', 'linkSubField', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom'], |
| | | check: ['initval', 'openVal', 'closeVal', 'readonly', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom', 'checkTip'], |
| | | date: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'place', 'marginTop', 'marginBottom', 'minDate', 'maxDate', 'precision'], |
| | |
| | | sql = sql.replace(/\n\s{6}/ig, '\n') |
| | | |
| | | if (window.GLOB.debugger === true) { |
| | | console.info('%c' + item.logLabel, 'color: blue') |
| | | console.info(sql) |
| | | } |
| | | } else { |
| | |
| | | sql = sql.replace(/\n\s{6}/ig, '\n') |
| | | |
| | | if (window.GLOB.debugger === true) { |
| | | console.info('%c' + btn.logLabel, 'color: blue') |
| | | console.info(sql) |
| | | } |
| | | } else { |
| | |
| | | Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50),@ModularDetailCode nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100),@mk_deleted int,@bid nvarchar(50)${_declarefields} |
| | | ` |
| | | |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let RoleID = sessionStorage.getItem('role_id') || '' |
| | | let departmentcode = sessionStorage.getItem('departmentcode') || '' |
| | |
| | | } |
| | | |
| | | if (window.GLOB.debugger === true) { |
| | | // _sql = _sql.replace(/\n\s{8}/ig, '\n') |
| | | console.info('%c' + btn.logLabel, 'color: blue') |
| | | console.info(_sql) |
| | | } |
| | | |
| | |
| | | width: 98%; |
| | | div { |
| | | padding: 0px 0px 0px 30px; |
| | | margin-right: 20px; |
| | | height: 40px; |
| | | line-height: 40px; |
| | | cursor: move; |
| | |
| | | } |
| | | } |
| | | } |
| | | .side-card div:first-child::before { |
| | | position: absolute; |
| | | content: ' '; |
| | | display: block; |
| | | width: 100%; |
| | | height: 8px; |
| | | top: -8px; |
| | | left: 0px; |
| | | } |
| | | .side-card:first-child div:first-child::before { |
| | | height: 15px; |
| | | top: -15px; |
| | | } |