| | |
| | | Tab={config.tab} |
| | | SupMenuID={this.props.MenuID} |
| | | MenuID={config.tab.linkTab} |
| | | refreshSupView={this.loadmaindata} |
| | | refreshSupView={() => this.loadmaindata()} |
| | | closeModalView={this.closeTab} |
| | | /> : null} |
| | | </Modal> |
| | |
| | | if (['text', 'select', 'link'].includes(item.type) && param) { |
| | | if (param.searchkey === item.field) { |
| | | item.initval = param.searchval |
| | | } else if (param.BID && item.field === 'BID') { |
| | | } else if (param.BID && item.field.toLowerCase() === 'bid') { |
| | | item.initval = param.BID |
| | | } else if (param.data && param.data[item.field]) { |
| | | item.initval = param.data[item.field] |
| | | } |
| | | } |
| | | |
| | |
| | | this.setState({ |
| | | triggerBtn: { |
| | | uuid: new Date().getTime(), |
| | | parentId: this.props.MenuID, |
| | | parentId: this.props.SupMenuID, |
| | | button: btn, |
| | | data: record |
| | | } |
| | |
| | | } |
| | | |
| | | let primaryId = '' |
| | | let _data = null |
| | | |
| | | if (btn.Ot === 'requiredSgl') { |
| | | primaryId = data[0][setting.primaryKey] || '' |
| | | _data = data[0] |
| | | } |
| | | |
| | | let newtab = {} |
| | |
| | | type: _type, |
| | | selected: true, |
| | | param: { |
| | | BID: primaryId |
| | | BID: primaryId, |
| | | data: _data |
| | | } |
| | | } |
| | | } |
| | |
| | | if (!endTime || !/^(1|2)\d{3}(-|\/)\d{2}(-|\/)\d{2}/.test(endTime)) return |
| | | if (!item[calendar.remarkfield]) return |
| | | |
| | | let equal = endTime.substr(0, 4) === startTime.substr(0, 4) |
| | | |
| | | datalist.push({ |
| | | color: colors[color] || '', |
| | | level: color && levels[color] ? levels[color] : 100, |
| | |
| | | startMonth: startTime.substr(0, 4) + startTime.substr(5, 2), |
| | | endMonth: endTime.substr(0, 4) + endTime.substr(5, 2), |
| | | start: startTime.substr(0, 4) + startTime.substr(5, 2) + startTime.substr(8, 2), |
| | | startTime: `${startTime.substr(5, 2)}-${startTime.substr(8, 2)}`, |
| | | startTime: equal ? `${startTime.substr(5, 2)}-${startTime.substr(8, 2)}` : `${startTime.substr(0, 4)}-${startTime.substr(5, 2)}-${startTime.substr(8, 2)}`, |
| | | end: endTime.substr(0, 4) + endTime.substr(5, 2) + endTime.substr(8, 2), |
| | | endTime: `${endTime.substr(5, 2)}-${endTime.substr(8, 2)}` |
| | | endTime: equal ? `${endTime.substr(5, 2)}-${endTime.substr(8, 2)}` : `${endTime.substr(0, 4)}-${endTime.substr(5, 2)}-${endTime.substr(8, 2)}` |
| | | }) |
| | | }) |
| | | |
| | |
| | | width: calc(100% - 2px); |
| | | transition: background 0.1s; |
| | | margin-bottom: 2px; |
| | | box-shadow: 0px 0px 1px #f7f7f7; |
| | | box-shadow: 0px 0px 3px #bae7ff; |
| | | .header { |
| | | text-align: center; |
| | | font-size: 16px; |
| | |
| | | right: 0; |
| | | .message { |
| | | width: 100%; |
| | | // white-space: nowrap; |
| | | // overflow: hidden; |
| | | // text-overflow: ellipsis; |
| | | .ant-badge-status-text { |
| | | color: inherit; |
| | | } |
| | |
| | | width: calc(100% - 2px); |
| | | cursor: pointer; |
| | | transition: background 0.1s; |
| | | box-shadow: 0px 0px 1px #f7f7f7; |
| | | box-shadow: 0px 0px 3px #bae7ff; |
| | | .header { |
| | | text-align: center; |
| | | font-size: 16px; |
| | |
| | | display: inline-block; |
| | | min-width: 200px; |
| | | max-width: 350px; |
| | | // white-space: nowrap; |
| | | vertical-align: middle; |
| | | // overflow: hidden; |
| | | // text-overflow: ellipsis; |
| | | } |
| | | } |
| | | .ant-popover-inner-content { |
| | |
| | | if (item.field && record.hasOwnProperty(item.field)) { |
| | | content = `${record[item.field]}` |
| | | } |
| | | |
| | | content = content ? (item.prefix || '') + content + (item.postfix || '') : '' |
| | | |
| | | if (content !== '') { |
| | | if (item.format === 'YYYY-MM-DD' && /^[1-9]\d{3}(-|\/)(0[1-9]|1[0-2])(-|\/)(0[1-9]|[1-2][0-9]|3[0-1])/.test(content)) { |
| | | content = `${content.substr(0, 4)}-${content.substr(5, 2)}-${content.substr(8, 2)}` |
| | | } else if (item.format === 'YYYY-MM-DD HH:mm:ss' && /^[1-9]\d{3}(-|\/)(0[1-9]|1[0-2])(-|\/)(0[1-9]|[1-2][0-9]|3[0-1]).([0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]/.test(content)) { |
| | | content = `${content.substr(0, 4)}-${content.substr(5, 2)}-${content.substr(8, 2)} ${content.substr(11, 2)}:${content.substr(14, 2)}:${content.substr(17, 2)}` |
| | | } |
| | | |
| | | content = (item.prefix || '') + content + (item.postfix || '') |
| | | } |
| | | |
| | | if (item.marks) { |
| | | let result = this.getMark(record, item.marks) |
| | | |
| | |
| | | let content = record[col.field] |
| | | |
| | | if (content !== '') { |
| | | if (col.format === 'YYYY-MM-DD' && /^[1-9]\d{3}(-|\/)(0[1-9]|1[0-2])(-|\/)(0[1-9]|[1-2][0-9]|3[0-1])/.test(content)) { |
| | | content = `${content.substr(0, 4)}-${content.substr(5, 2)}-${content.substr(8, 2)}` |
| | | } else if (col.format === 'YYYY-MM-DD HH:mm:ss' && /^[1-9]\d{3}(-|\/)(0[1-9]|1[0-2])(-|\/)(0[1-9]|[1-2][0-9]|3[0-1]).([0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]/.test(content)) { |
| | | content = `${content.substr(0, 4)}-${content.substr(5, 2)}-${content.substr(8, 2)} ${content.substr(11, 2)}:${content.substr(14, 2)}:${content.substr(17, 2)}` |
| | | } |
| | | |
| | | content = (col.prefix || '') + record[col.field] + (col.postfix || '') |
| | | } |
| | | |
| | |
| | | import './index.scss' |
| | | |
| | | const columnTypeOptions = { |
| | | text: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'fieldlength', 'blacklist', 'linkmenu'], |
| | | text: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'textFormat', 'fieldlength', 'blacklist', 'linkmenu'], |
| | | number: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'blacklist', 'linkmenu'], |
| | | link: ['label', 'field', 'type', 'nameField', 'Align', 'Hide', 'IsSort', 'joint', 'Width', 'fieldlength', 'blacklist'], |
| | | textarea: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'fieldlength', 'blacklist'], |
| | |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'fieldlength', |
| | | label: Formdict['model.form.field'] + Formdict['model.length'], |
| | | initVal: card.fieldlength || (card.type === 'text' ? 50 : 512), |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'format', |
| | | label: Formdict['header.form.format'], |
| | |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'fieldlength', |
| | | label: Formdict['model.form.field'] + Formdict['model.length'], |
| | | initVal: card.fieldlength || (card.type === 'text' ? 50 : 512), |
| | | required: true |
| | | type: 'select', |
| | | key: 'textFormat', |
| | | label: Formdict['header.form.format'], |
| | | initVal: card.format || '', |
| | | options: [{ |
| | | value: '', |
| | | text: Formdict['model.empty'] |
| | | }, { |
| | | value: 'YYYY-MM-DD', |
| | | text: 'YYYY-MM-DD' |
| | | }, { |
| | | value: 'YYYY-MM-DD HH:mm:ss', |
| | | text: 'YYYY-MM-DD HH:mm:ss' |
| | | }], |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'text', |