| | |
| | | profVisible: true, |
| | | card: element |
| | | }) |
| | | MKEmitter.emit('modalStatus', '验证信息') |
| | | } |
| | | |
| | | /** |
| | |
| | | }, () => { |
| | | this.props.updateElement(_elements) |
| | | }) |
| | | |
| | | MKEmitter.emit('modalStatus', false) |
| | | }) |
| | | } |
| | | |
| | |
| | | if (this.verifyRef.handleCancel) { |
| | | this.verifyRef.handleCancel().then(() => { |
| | | this.setState({ profVisible: false }) |
| | | MKEmitter.emit('modalStatus', false) |
| | | }) |
| | | } else { |
| | | this.setState({ profVisible: false }) |
| | | MKEmitter.emit('modalStatus', false) |
| | | } |
| | | }} |
| | | destroyOnClose |
| | |
| | | if (!err) { |
| | | let _plot = {...plot, ...values} |
| | | |
| | | if (values.datatype === 'statistics' || values.datatype !== plot.datatype) { |
| | | _plot.enabled = 'false' |
| | | _plot.customs = [] |
| | | } else if (!values.Yaxis || !plot.Yaxis || !is(fromJS(values.Yaxis), fromJS(plot.Yaxis))) { |
| | | _plot.enabled = 'false' |
| | | _plot.customs = [] |
| | | _plot.colors = null |
| | | } |
| | | |
| | | if (values.datatype !== plot.datatype) { |
| | | _plot.colors = null |
| | | } |
| | | if (values.datatype === 'statistics') { |
| | | _plot.enabled = 'false' |
| | | _plot.customs = [] |
| | | delete _plot.Yaxis |
| | | } else if (!is(fromJS(values.Yaxis), fromJS(plot.Yaxis || []))) { |
| | | _plot.enabled = 'false' |
| | | _plot.colors = null |
| | | |
| | | let labels = {} |
| | | config.columns.forEach(col => { |
| | | labels[col.field] = col.label |
| | | }) |
| | | |
| | | let cus = {} |
| | | _plot.customs && _plot.customs.forEach(m => { |
| | | cus[m.type] = m |
| | | }) |
| | | _plot.customs = _plot.Yaxis.map((item, i) => { |
| | | if (cus[item]) return cus[item] |
| | | |
| | | return { |
| | | uuid: Utils.getuuid(), |
| | | type: item, |
| | | name: labels[item] || item, |
| | | axis: i === 0 ? 'true' : 'false', |
| | | label: 'false', |
| | | title: 'true', |
| | | shape: _plot.chartType === 'bar' && i === 0 ? ['bar', 'rect'] : ['line', 'smooth'] |
| | | } |
| | | }) |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | if (!err) { |
| | | let _plot = {...plot, ...values} |
| | | |
| | | if (values.datatype === 'statistics' || values.datatype !== plot.datatype) { |
| | | _plot.enabled = 'false' |
| | | _plot.customs = [] |
| | | } else if (!values.Yaxis || !plot.Yaxis || !is(fromJS(values.Yaxis), fromJS(plot.Yaxis))) { |
| | | _plot.enabled = 'false' |
| | | _plot.customs = [] |
| | | _plot.colors = null |
| | | } |
| | | |
| | | let labels = {} |
| | | config.columns.forEach(col => { |
| | | labels[col.field] = col.label |
| | | }) |
| | | |
| | | if (values.datatype !== 'statistics' && (!_plot.customs || _plot.customs.length === 0)) { |
| | | if (values.datatype !== plot.datatype) { |
| | | _plot.colors = null |
| | | } |
| | | if (values.datatype === 'statistics') { |
| | | _plot.enabled = 'false' |
| | | _plot.customs = [] |
| | | delete _plot.Yaxis |
| | | } else if (!is(fromJS(values.Yaxis), fromJS(plot.Yaxis || []))) { |
| | | _plot.enabled = 'false' |
| | | _plot.colors = null |
| | | |
| | | let cus = {} |
| | | _plot.customs && _plot.customs.forEach(m => { |
| | | cus[m.type] = m |
| | | }) |
| | | _plot.customs = _plot.Yaxis.map((item, i) => { |
| | | if (cus[item]) return cus[item] |
| | | |
| | | return { |
| | | uuid: Utils.getuuid(), |
| | | type: item, |
| | |
| | | } |
| | | }) |
| | | } |
| | | if (values.datatype !== plot.datatype || !_plot.colors) { |
| | | |
| | | if (!_plot.colors) { |
| | | _plot.colors = [] |
| | | if (_plot.datatype === 'query') { |
| | | let limit = chartColors.length |
| | |
| | | this.setState({ |
| | | profVisible: true |
| | | }) |
| | | MKEmitter.emit('modalStatus', '验证信息') |
| | | } |
| | | |
| | | /** |
| | |
| | | profVisible: false |
| | | }) |
| | | this.props.updateconfig(group) |
| | | MKEmitter.emit('modalStatus', false) |
| | | }) |
| | | } |
| | | |
| | |
| | | if (this.verifyRef.handleCancel) { |
| | | this.verifyRef.handleCancel().then(() => { |
| | | this.setState({ profVisible: false }) |
| | | MKEmitter.emit('modalStatus', false) |
| | | }) |
| | | } else { |
| | | this.setState({ profVisible: false }) |
| | | MKEmitter.emit('modalStatus', false) |
| | | } |
| | | }} |
| | | destroyOnClose |
| | |
| | | profVisible: true, |
| | | card: element |
| | | }) |
| | | MKEmitter.emit('modalStatus', '验证信息') |
| | | } |
| | | |
| | | /** |
| | |
| | | }, () => { |
| | | this.props.updateaction({...config, action: _actionlist}) |
| | | }) |
| | | MKEmitter.emit('modalStatus', false) |
| | | }) |
| | | } |
| | | |
| | |
| | | if (this.verifyRef.handleCancel) { |
| | | this.verifyRef.handleCancel().then(() => { |
| | | this.setState({ profVisible: false }) |
| | | MKEmitter.emit('modalStatus', false) |
| | | }) |
| | | } else { |
| | | this.setState({ profVisible: false }) |
| | | MKEmitter.emit('modalStatus', false) |
| | | } |
| | | }} |
| | | destroyOnClose |
| | |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | | import VerifyCard from './verifycard' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import './index.scss' |
| | | |
| | | class DataSource extends Component { |
| | |
| | | visible: true, |
| | | mainSearch: search |
| | | }) |
| | | |
| | | MKEmitter.emit('modalStatus', '数据源') |
| | | } |
| | | |
| | | verifySubmit = () => { |
| | |
| | | |
| | | this.setState({loading: false, visible: false}) |
| | | this.props.updateConfig({...config, ...res}) |
| | | |
| | | MKEmitter.emit('modalStatus', false) |
| | | }, () => { |
| | | this.setState({loading: false}) |
| | | }) |
| | |
| | | <SettingOutlined title="数据源" onClick={() => this.editDataSource()} /> |
| | | <Modal |
| | | wrapClassName="popview-modal" |
| | | title={'数据源配置'} |
| | | title="数据源配置" |
| | | visible={visible} |
| | | width={'75vw'} |
| | | maskClosable={false} |
| | | okText={dict['model.submit']} |
| | | onOk={this.verifySubmit} |
| | | confirmLoading={loading} |
| | | onCancel={() => { this.setState({ visible: false }) }} |
| | | onCancel={() => { MKEmitter.emit('modalStatus', false);this.setState({ visible: false }) }} |
| | | destroyOnClose |
| | | > |
| | | <VerifyCard |
| | |
| | | // 字段透视 |
| | | let hasReqFields = false |
| | | config.search = config.search.map(item => { |
| | | if (['text', 'select', 'link'].includes(item.type) && param.$searchkey === item.field) { |
| | | if (param && ['text', 'select', 'link'].includes(item.type) && param.$searchkey === item.field) { |
| | | item.initval = param.$searchval |
| | | } |
| | | |
| | |
| | | openView = () => { |
| | | const { card, data, cards } = this.props |
| | | |
| | | if (!card.setting.click) return |
| | | if (!card.setting.click || data.$disabled) return |
| | | |
| | | if (card.setting.click === 'menus' && cards.subtype === 'datacard' && card.$cardType !== 'extendCard') { |
| | | let menu = null |
| | |
| | | } else if (cards.subtype === 'datacard') { |
| | | MKEmitter.emit('triggerBtnId', card.setting.linkbtn, [data], 'linkbtn') |
| | | } else { |
| | | MKEmitter.emit('triggerBtnId', card.setting.linkbtn, [data]) |
| | | MKEmitter.emit('triggerBtnId', card.setting.linkbtn, data.$$empty ? [] : [data]) |
| | | } |
| | | } |
| | | } |
| | |
| | | doubleClick = () => { |
| | | const { card, data, cards } = this.props |
| | | |
| | | if (card.setting.click !== 'button' || card.setting.clickType !== 'multi') return |
| | | if (card.setting.click !== 'button' || card.setting.clickType !== 'multi' || data.$disabled) return |
| | | |
| | | if (card.setting.linkbtn) { |
| | | if (data.$$type === 'extendCard') { |
| | |
| | | } else if (cards.subtype === 'datacard') { |
| | | MKEmitter.emit('triggerBtnId', card.setting.linkbtn, [data], 'linkbtn') |
| | | } else { |
| | | MKEmitter.emit('triggerBtnId', card.setting.linkbtn, [data]) |
| | | MKEmitter.emit('triggerBtnId', card.setting.linkbtn, data.$$empty ? [] : [data]) |
| | | } |
| | | } |
| | | } |
| | |
| | | openView = () => { |
| | | const { card, data, cards } = this.props |
| | | |
| | | if (!card.setting.click || data.$disabled) return |
| | | |
| | | if (card.setting.click === 'menu' && card.setting.MenuID) { |
| | | let menu = { |
| | | MenuID: card.setting.MenuID, |
| | |
| | | if (cards.subtype === 'datacard') { |
| | | MKEmitter.emit('triggerBtnId', card.setting.linkbtn, [data], 'linkbtn') |
| | | } else { |
| | | MKEmitter.emit('triggerBtnId', card.setting.linkbtn, [data]) |
| | | MKEmitter.emit('triggerBtnId', card.setting.linkbtn, data.$$empty ? [] : [data]) |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | let _this = this |
| | | let data = record || selectedData || [] |
| | | |
| | | |
| | | if (btn.Ot !== 'notRequired' && data.length === 0) { |
| | | // 需要选择行时,校验数据 |
| | | notification.warning({ |
| | |
| | | activeKey: '0', // 默认展开基本信息 |
| | | openEdition: '', // 编辑版本标记,防止多人操作 |
| | | mockdata: [], // 测试数据 |
| | | modalStatus: false // 弹窗是否开启,判断ctrl+s是否可用 |
| | | } |
| | | |
| | | /** |
| | |
| | | let _shortcut = `${preKey}+${keyCode}` |
| | | |
| | | if (_shortcut === 'ctrl+83') { |
| | | if (this.state.modalStatus) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '请保存' + this.state.modalStatus, |
| | | duration: 5 |
| | | }) |
| | | return false |
| | | } |
| | | |
| | | let node = document.getElementById('save-config') |
| | | if (node && node.click) { |
| | | node.click() |
| | |
| | | return false |
| | | } |
| | | } |
| | | MKEmitter.addListener('modalStatus', this.modalStatus) |
| | | } |
| | | |
| | | getMockData = (year) => { |
| | |
| | | return |
| | | } |
| | | document.onkeydown = () => {} |
| | | MKEmitter.removeListener('modalStatus', this.modalStatus) |
| | | } |
| | | |
| | | modalStatus = (val) => { |
| | | this.setState({modalStatus: val}) |
| | | } |
| | | |
| | | // 页面返回 |
| | |
| | | thawButtons: [], // 已选择要解冻的按钮 |
| | | activeKey: '0', // 默认展开基本信息 |
| | | chartview: null, // 当前视图 |
| | | openEdition: '' // 编辑版本标记,防止多人操作 |
| | | openEdition: '', // 编辑版本标记,防止多人操作 |
| | | modalStatus: false // 弹窗是否开启,判断ctrl+s是否可用 |
| | | } |
| | | |
| | | /** |
| | |
| | | let _shortcut = `${preKey}+${keyCode}` |
| | | |
| | | if (_shortcut === 'ctrl+83') { |
| | | if (this.state.modalStatus) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '请保存' + this.state.modalStatus, |
| | | duration: 5 |
| | | }) |
| | | return false |
| | | } |
| | | |
| | | let node = document.getElementById('save-config') |
| | | if (node && node.click) { |
| | | node.click() |
| | |
| | | return false |
| | | } |
| | | } |
| | | |
| | | MKEmitter.addListener('modalStatus', this.modalStatus) |
| | | } |
| | | |
| | | /** |
| | |
| | | return |
| | | } |
| | | document.onkeydown = () => {} |
| | | MKEmitter.removeListener('modalStatus', this.modalStatus) |
| | | } |
| | | |
| | | modalStatus = (val) => { |
| | | this.setState({modalStatus: val}) |
| | | } |
| | | |
| | | /** |
| | |
| | | profVisible: true, |
| | | card: element |
| | | }) |
| | | |
| | | MKEmitter.emit('modalStatus', '验证信息') |
| | | } |
| | | |
| | | /** |
| | |
| | | }, () => { |
| | | this.props.updateaction({...config, action: _actionlist}) |
| | | }) |
| | | |
| | | MKEmitter.emit('modalStatus', false) |
| | | }) |
| | | } |
| | | |
| | |
| | | if (this.verifyRef.handleCancel) { |
| | | this.verifyRef.handleCancel().then(() => { |
| | | this.setState({ profVisible: false }) |
| | | MKEmitter.emit('modalStatus', false) |
| | | }) |
| | | } else { |
| | | this.setState({ profVisible: false }) |
| | | MKEmitter.emit('modalStatus', false) |
| | | } |
| | | }} |
| | | destroyOnClose |
| | |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | | import VerifyCard from './verifycard' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import './index.scss' |
| | | |
| | | class DataSource extends Component { |
| | |
| | | this.setState({ |
| | | visible: true |
| | | }) |
| | | MKEmitter.emit('modalStatus', '数据源') |
| | | } |
| | | |
| | | verifySubmit = () => { |
| | |
| | | |
| | | this.setState({loading: false, visible: false}) |
| | | this.props.updateConfig({...config, ...res}) |
| | | |
| | | MKEmitter.emit('modalStatus', false) |
| | | }, () => { |
| | | this.setState({loading: false}) |
| | | }) |
| | |
| | | <SettingOutlined onClick={() => this.editDataSource()} /> |
| | | <Modal |
| | | wrapClassName="popview-modal" |
| | | title={'数据源配置'} |
| | | title="数据源配置" |
| | | visible={visible} |
| | | width={'75vw'} |
| | | maskClosable={false} |
| | | okText={dict['model.submit']} |
| | | onOk={this.verifySubmit} |
| | | confirmLoading={loading} |
| | | onCancel={() => { this.setState({ visible: false }) }} |
| | | onCancel={() => { MKEmitter.emit('modalStatus', false); this.setState({ visible: false }) }} |
| | | destroyOnClose |
| | | > |
| | | <VerifyCard |
| | |
| | | import Utils, { FuncUtils } from '@/utils/utils.js' |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | | |
| | | import MKEmitter from '@/utils/events.js' |
| | | import SettingForm from './settingform' |
| | | import CreateFunc from '@/templates/zshare/createfunc' |
| | | import CreateInterface from '@/templates/zshare/createinterface' |
| | |
| | | search: _search, |
| | | menu: menu |
| | | }) |
| | | |
| | | MKEmitter.emit('modalStatus', '数据源') |
| | | } |
| | | |
| | | /** |
| | |
| | | res.columnfixed = res.columnfixed === 'true' |
| | | |
| | | this.props.updatesetting({...config, setting: res}) |
| | | |
| | | MKEmitter.emit('modalStatus', false) |
| | | }, () => { |
| | | this.setState({ |
| | | loading: false |
| | |
| | | {/* 设置全局配置及列表数据源 */} |
| | | <Modal |
| | | wrapClassName="model-table-setting-verify-modal" |
| | | title={dict['model.edit']} |
| | | title="数据源配置" |
| | | visible={visible} |
| | | width={900} |
| | | maskClosable={false} |
| | | onCancel={() => { this.setState({ visible: false, loading: false })}} |
| | | onCancel={() => { MKEmitter.emit('modalStatus', false); this.setState({ visible: false, loading: false })}} |
| | | footer={[ |
| | | record && record.interType === 'system' ? <CreateInterface key="interface" loading={this.state.interloading} dict={dict} ref="tableCreatInterface" trigger={this.tableCreatInterface}/> : null, |
| | | record && record.interType === 'inner' ? <CreateFunc key="create" dict={dict} ref="funcCreatComponent" trigger={this.tableCreatFunc}/> : null, |
| | | <Button key="cancel" onClick={() => { this.setState({ visible: false, loading: false }) }}>{this.state.dict['model.cancel']}</Button>, |
| | | <Button key="cancel" onClick={() => { MKEmitter.emit('modalStatus', false); this.setState({ visible: false, loading: false }) }}>{this.state.dict['model.cancel']}</Button>, |
| | | <Button key="confirm" type="primary" loading={this.state.loading} onClick={this.settingSave}>{this.state.dict['model.confirm']}</Button> |
| | | ]} |
| | | destroyOnClose |
| | |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | | import SettingForm from './settingform' |
| | | import MKEmitter from '@/utils/events.js' |
| | | |
| | | import './index.scss' |
| | | |
| | |
| | | visible: true, |
| | | menu: menu |
| | | }) |
| | | MKEmitter.emit('modalStatus', '数据源') |
| | | } |
| | | |
| | | /** |
| | |
| | | }) |
| | | |
| | | this.props.updatesetting({...config, setting: res}) |
| | | |
| | | MKEmitter.emit('modalStatus', false) |
| | | }, () => { |
| | | this.setState({ |
| | | loading: false |
| | |
| | | {/* 设置全局配置及列表数据源 */} |
| | | <Modal |
| | | wrapClassName="model-tree-setting-verify-modal" |
| | | title={dict['model.edit']} |
| | | title="数据源配置" |
| | | visible={visible} |
| | | width={900} |
| | | maskClosable={false} |
| | | onCancel={() => { this.setState({ visible: false })}} |
| | | onCancel={() => { MKEmitter.emit('modalStatus', false); this.setState({ visible: false })}} |
| | | confirmLoading={loading} |
| | | onOk={this.settingSave} |
| | | destroyOnClose |
| | |
| | | thawButtons: [], // 已选择要解冻的按钮 |
| | | activeKey: '0', // 默认展开基本信息 |
| | | chartview: null, // 当前视图 |
| | | openEdition: '' // 编辑版本标记,防止多人操作 |
| | | openEdition: '', // 编辑版本标记,防止多人操作 |
| | | modalStatus: false // 弹窗是否开启,判断ctrl+s是否可用 |
| | | } |
| | | |
| | | /** |
| | |
| | | let _shortcut = `${preKey}+${keyCode}` |
| | | |
| | | if (_shortcut === 'ctrl+83') { |
| | | if (this.state.modalStatus) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '请保存' + this.state.modalStatus, |
| | | duration: 5 |
| | | }) |
| | | return false |
| | | } |
| | | |
| | | let node = document.getElementById('save-config') |
| | | if (node && node.click) { |
| | | node.click() |
| | |
| | | return false |
| | | } |
| | | } |
| | | MKEmitter.addListener('modalStatus', this.modalStatus) |
| | | } |
| | | |
| | | /** |
| | |
| | | return |
| | | } |
| | | document.onkeydown = () => {} |
| | | MKEmitter.removeListener('modalStatus', this.modalStatus) |
| | | } |
| | | |
| | | modalStatus = (val) => { |
| | | this.setState({modalStatus: val}) |
| | | } |
| | | |
| | | // 页面返回 |
| | |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | | |
| | | import MKEmitter from '@/utils/events.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | |
| | | import MenuForm from '@/templates/comtableconfig/menuform' |
| | | import SourceElement from '@/templates/zshare/dragsource' |
| | | import Source from './source' |
| | |
| | | delTabs: [], // 删除标签列表 |
| | | tabviews: [], // 所有标签页 |
| | | activeKey: '0', // 默认展开基本信息 |
| | | openEdition: '' // 编辑版本标记,防止多人操作 |
| | | openEdition: '', // 编辑版本标记,防止多人操作 |
| | | modalStatus: false // 弹窗是否开启,判断ctrl+s是否可用 |
| | | } |
| | | |
| | | /** |
| | |
| | | let _shortcut = `${preKey}+${keyCode}` |
| | | |
| | | if (_shortcut === 'ctrl+83') { |
| | | if (this.state.modalStatus) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '请保存' + this.state.modalStatus, |
| | | duration: 5 |
| | | }) |
| | | return false |
| | | } |
| | | |
| | | let node = document.getElementById('save-config') |
| | | if (node && node.click) { |
| | | node.click() |
| | |
| | | return false |
| | | } |
| | | } |
| | | MKEmitter.addListener('modalStatus', this.modalStatus) |
| | | } |
| | | |
| | | /** |
| | |
| | | return |
| | | } |
| | | document.onkeydown = () => {} |
| | | MKEmitter.removeListener('modalStatus', this.modalStatus) |
| | | } |
| | | |
| | | modalStatus = (val) => { |
| | | this.setState({modalStatus: val}) |
| | | } |
| | | |
| | | /** |
| | |
| | | customComponents: [], |
| | | comloading: false, |
| | | settingshow: true, |
| | | eyeopen: false |
| | | eyeopen: false, |
| | | modalStatus: false // 弹窗是否开启,判断ctrl+s是否可用 |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | |
| | | |
| | | componentDidMount () { |
| | | MKEmitter.addListener('delButtons', this.delButtons) |
| | | MKEmitter.addListener('modalStatus', this.modalStatus) |
| | | MKEmitter.addListener('thawButtons', this.thawButtons) |
| | | MKEmitter.addListener('copyButtons', this.copyButtons) |
| | | MKEmitter.addListener('changePopview', this.initPopview) |
| | |
| | | let _shortcut = `${preKey}+${keyCode}` |
| | | |
| | | if (_shortcut === 'ctrl+83') { |
| | | if (this.state.modalStatus) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '请保存' + this.state.modalStatus, |
| | | duration: 5 |
| | | }) |
| | | return false |
| | | } |
| | | |
| | | let node = document.getElementById('save-modal-config') |
| | | if (!node) { |
| | | node = document.getElementById('save-pop-config') |
| | |
| | | return |
| | | } |
| | | MKEmitter.removeListener('delButtons', this.delButtons) |
| | | MKEmitter.removeListener('modalStatus', this.modalStatus) |
| | | MKEmitter.removeListener('thawButtons', this.thawButtons) |
| | | MKEmitter.removeListener('copyButtons', this.copyButtons) |
| | | MKEmitter.removeListener('changePopview', this.initPopview) |
| | |
| | | MKEmitter.removeListener('updateCustomComponent', this.updateCustomComponent) |
| | | } |
| | | |
| | | modalStatus = (val) => { |
| | | this.setState({modalStatus: val}) |
| | | } |
| | | |
| | | triggerMenuSave = () => { |
| | | if (this.state.visible) return |
| | | |
| | |
| | | comloading: false, |
| | | adapters: [], |
| | | viewType: 'menu', |
| | | eyeopen: false |
| | | eyeopen: false, |
| | | modalStatus: false // 弹窗是否开启,判断ctrl+s是否可用 |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | |
| | | document.getElementById('mk-mob-design-view').innerHTML = '<div style="text-align: center; font-size: 30px; margin-top: 40vh; height: 100vh; background: #fff;">本应用没有PC端页面的编辑权限,请联系管理员!</div>' |
| | | return |
| | | } |
| | | MKEmitter.addListener('changeEditMenu', this.changeEditMenu) |
| | | MKEmitter.addListener('modalStatus', this.modalStatus) |
| | | MKEmitter.addListener('triggerMenuSave', this.submitConfig) |
| | | MKEmitter.addListener('changeEditMenu', this.changeEditMenu) |
| | | MKEmitter.addListener('submitComponentStyle', this.updateComponentStyle) |
| | | MKEmitter.addListener('updateCustomComponent', this.updateCustomComponent) |
| | | setTimeout(() => { |
| | |
| | | let _shortcut = `${preKey}+${keyCode}` |
| | | |
| | | if (_shortcut === 'ctrl+83') { |
| | | if (this.state.modalStatus) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '请保存' + this.state.modalStatus, |
| | | duration: 5 |
| | | }) |
| | | return false |
| | | } |
| | | |
| | | let node = document.getElementById('save-modal-config') |
| | | if (!node) { |
| | | node = document.getElementById('save-config') |
| | |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | MKEmitter.removeListener('changeEditMenu', this.changeEditMenu) |
| | | MKEmitter.removeListener('modalStatus', this.modalStatus) |
| | | MKEmitter.removeListener('triggerMenuSave', this.submitConfig) |
| | | MKEmitter.removeListener('changeEditMenu', this.changeEditMenu) |
| | | MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle) |
| | | MKEmitter.removeListener('updateCustomComponent', this.updateCustomComponent) |
| | | } |
| | | |
| | | modalStatus = (val) => { |
| | | this.setState({modalStatus: val}) |
| | | } |
| | | |
| | | getSmStemp = () => { |
| | | let _sql = `select ID,TemplateCode,SignName from (select * from bd_msn_sms_temp where deleted=0 and status=20 ) a |
| | | inner join (select openid from sapp where id='${window.GLOB.appkey}') b |
| | |
| | | settingshow: sessionStorage.getItem('settingshow') !== 'false', |
| | | controlshow: sessionStorage.getItem('controlshow') !== 'false', |
| | | comloading: false, |
| | | eyeopen: false |
| | | eyeopen: false, |
| | | modalStatus: false // 弹窗是否开启,判断ctrl+s是否可用 |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | |
| | | return |
| | | } |
| | | MKEmitter.addListener('delButtons', this.delButtons) |
| | | MKEmitter.addListener('modalStatus', this.modalStatus) |
| | | MKEmitter.addListener('thawButtons', this.thawButtons) |
| | | MKEmitter.addListener('copyButtons', this.copyButtons) |
| | | MKEmitter.addListener('changePopview', this.initPopview) |
| | |
| | | let _shortcut = `${preKey}+${keyCode}` |
| | | |
| | | if (_shortcut === 'ctrl+83') { |
| | | if (this.state.modalStatus) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '请保存' + this.state.modalStatus, |
| | | duration: 5 |
| | | }) |
| | | return false |
| | | } |
| | | |
| | | let node = document.getElementById('save-modal-config') |
| | | if (!node) { |
| | | node = document.getElementById('save-pop-config') |
| | |
| | | return |
| | | } |
| | | MKEmitter.removeListener('delButtons', this.delButtons) |
| | | MKEmitter.removeListener('modalStatus', this.modalStatus) |
| | | MKEmitter.removeListener('thawButtons', this.thawButtons) |
| | | MKEmitter.removeListener('copyButtons', this.copyButtons) |
| | | MKEmitter.removeListener('changePopview', this.initPopview) |
| | |
| | | MKEmitter.removeListener('updateCustomComponent', this.updateCustomComponent) |
| | | } |
| | | |
| | | modalStatus = (val) => { |
| | | this.setState({modalStatus: val}) |
| | | } |
| | | |
| | | triggerMenuSave = () => { |
| | | if (this.state.visible) return |
| | | |