king
2021-07-01 151d3aee0218a3eb6b928b0b327be6cd9ac7652c
2021-07-01
12个文件已修改
148 ■■■■■ 已修改文件
src/api/index.js 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modalconfig/index.jsx 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/modalconfig/index.jsx 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/modalconfig/index.scss 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/appmanage/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.jsx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pcdesign/index.jsx 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js
@@ -297,9 +297,14 @@
      return new Promise((resolve, reject) => {
        CacheUtils.getWebSqlVersion().then(msg => {
          appVersion.oldVersion = msg.version || ''
          let modifydate = msg.createDate || curTime
          if (modifydate.indexOf('Invalid date') > -1) {
            modifydate = curTime
          }
          let param = {
            func: 's_get_app_version',
            modifydate: msg.createDate || curTime,
            modifydate
          }
  
          this.getSystemConfig(param).then(res => {
@@ -343,9 +348,13 @@
      return new Promise((resolve, reject) => {
        CacheUtils.getIndexDBVersion().then(msg => {
          appVersion.oldVersion = msg.version || ''
          let modifydate = msg.createDate || curTime
          if (modifydate.indexOf('Invalid date') > -1) {
            modifydate = curTime
          }
          let param = {
            func: 's_get_app_version',
            modifydate: msg.createDate || curTime,
            modifydate
          }
          this.getSystemConfig(param).then(res => {
src/menu/components/card/cardcellcomponent/index.jsx
@@ -478,6 +478,7 @@
  handleSubConfig = (item) => {
    const { cards } = this.props
    const { appType } = this.state
    let btn = fromJS(item).toJS()
    if ((sessionStorage.getItem('style-control') && sessionStorage.getItem('style-control') === 'true')) return
@@ -486,7 +487,7 @@
      if (btn.OpenType === 'pop') {
        if (!btn.modal) {
          btn.modal = {
            setting: { title: btn.label, width: 60, cols: '2', container: 'view', focus: '', finish: 'close', clickouter: 'unclose', display: 'modal' },
            setting: { title: btn.label, width: appType === 'mob' ? 100 : 60, cols: '2', container: 'view', focus: '', finish: 'close', clickouter: 'unclose', display: 'modal' },
            tables: [],
            groups: [],
            fields: []
src/menu/components/card/data-card/index.jsx
@@ -294,13 +294,13 @@
  }
  setSubConfig = (item) => {
    const { card } = this.state
    const { card, appType } = this.state
    let btn = fromJS(item).toJS()
    if (btn.OpenType === 'pop' || btn.execMode === 'pop') {
      if (!btn.modal) {
        btn.modal = {
          setting: { title: btn.label, width: 60, cols: '2', container: 'view', focus: '', finish: 'close', clickouter: 'unclose', display: 'modal' },
          setting: { title: btn.label, width: appType === 'mob' ? 100 : 60, cols: '2', container: 'view', focus: '', finish: 'close', clickouter: 'unclose', display: 'modal' },
          tables: [],
          groups: [],
          fields: []
src/menu/components/table/normal-table/index.jsx
@@ -299,13 +299,13 @@
  }
  setSubConfig = (item) => {
    const { card } = this.state
    const { card, appType } = this.state
    let btn = fromJS(item).toJS()
    if (btn.OpenType === 'pop' || btn.execMode === 'pop') {
      if (!btn.modal) {
        btn.modal = {
          setting: { title: btn.label, width: 60, cols: '2', container: 'view', focus: '', finish: 'close', clickouter: 'unclose', display: 'modal' },
          setting: { title: btn.label, width: appType === 'mob' ? 100 : 60, cols: '2', container: 'view', focus: '', finish: 'close', clickouter: 'unclose', display: 'modal' },
          tables: [],
          groups: [],
          fields: []
src/menu/modalconfig/index.jsx
@@ -37,20 +37,11 @@
    dict: CommonDict,      // 字典
    config: null,          // 页面配置,包括模板类型、模态框设置、添加表名、表单列表
    visible: false,        // 表单编辑模态框,显示控制
    tableVisible: false,   // 数据表字段列表模态框,显示控制
    tableColumns: [],      // 表格字段名列表
    fields: null,          // 表单,可选字段(去重后)
    formlist: null,        // 表单编辑模态框,可编辑字段
    card: null,            // 编辑元素
    closeloading: false,   // 菜单保存中
    settingVisible: false, // 全局配置模态框
    closeVisible: false,   // 关闭模态框
    tables: [],            // 可用表名
    selectedTables: [],    // 已选表名
    originConfig: null,    // 原始菜单
    sources: null,         // 表单类型
    sqlVerifing: false,    // sql验证
    openEdition: '',       // 编辑版本标记,防止多人操作
    showField: false,      // 显示表单字段值
    standardform: null
  }
@@ -297,7 +288,7 @@
  submitConfig = () => {
    const { config } = this.state
    this.setState({originConfig: fromJS(config).toJS(), closeVisible: false})
    this.setState({originConfig: fromJS(config).toJS()})
    this.props.handleSave(config)
    notification.success({
      top: 92,
@@ -310,8 +301,13 @@
    const { config, originConfig } = this.state
    if (!is(fromJS(config), fromJS(originConfig))) {
      this.setState({
        closeVisible: true
      let _this = this
      confirm({
        content: '配置信息未保存,确定返回吗?',
        onOk() {
          _this.props.handleBack()
        },
        onCancel() {}
      })
    } else {
      this.props.handleBack()
@@ -505,21 +501,6 @@
            inputSubmit={this.settingSave}
            wrappedComponentRef={(inst) => this.settingRef = inst}
          />
        </Modal>
        <Modal
          bodyStyle={{textAlign: 'center', color: '#000000', fontSize: '16px'}}
          closable={false}
          maskClosable={false}
          visible={this.state.closeVisible}
          onCancel={() => { this.setState({closeVisible: false}) }}
          footer={[
            <Button key="save" className="mk-btn mk-green" loading={this.state.closeloading} onClick={this.submitConfig}>{this.state.dict['model.save']}</Button>,
            <Button key="confirm" className="mk-btn mk-yellow" onClick={this.props.handleBack}>{this.state.dict['model.notsave']}</Button>,
            <Button key="cancel" onClick={() => { this.setState({closeVisible: false}) }}>{this.state.dict['model.cancel']}</Button>
          ]}
          destroyOnClose
        >
          {this.state.dict['header.menu.config.placeholder']}
        </Modal>
      </div>
    )
src/mob/modalconfig/index.jsx
@@ -37,20 +37,11 @@
    dict: CommonDict,      // 字典
    config: null,          // 页面配置,包括模板类型、模态框设置、添加表名、表单列表
    visible: false,        // 表单编辑模态框,显示控制
    tableVisible: false,   // 数据表字段列表模态框,显示控制
    tableColumns: [],      // 表格字段名列表
    fields: null,          // 表单,可选字段(去重后)
    formlist: null,        // 表单编辑模态框,可编辑字段
    card: null,            // 编辑元素
    closeloading: false,   // 菜单保存中
    settingVisible: false, // 全局配置模态框
    closeVisible: false,   // 关闭模态框
    tables: [],            // 可用表名
    selectedTables: [],    // 已选表名
    originConfig: null,    // 原始菜单
    sources: null,         // 表单类型
    sqlVerifing: false,    // sql验证
    openEdition: '',       // 编辑版本标记,防止多人操作
    showField: false,      // 显示表单字段值
    standardform: null
  }
@@ -297,7 +288,7 @@
  submitConfig = () => {
    const { config } = this.state
    this.setState({originConfig: fromJS(config).toJS(), closeVisible: false})
    this.setState({originConfig: fromJS(config).toJS()})
    this.props.handleSave(config)
    notification.success({
      top: 92,
@@ -310,8 +301,13 @@
    const { config, originConfig } = this.state
    if (!is(fromJS(config), fromJS(originConfig))) {
      this.setState({
        closeVisible: true
      let _this = this
      confirm({
        content: '配置信息未保存,确定返回吗?',
        onOk() {
          _this.props.handleBack()
        },
        onCancel() {}
      })
    } else {
      this.props.handleBack()
@@ -370,7 +366,6 @@
  }
  render () {
    const { btn } = this.props
    const { config, dict } = this.state
    return (
@@ -404,7 +399,7 @@
              <div className="mob-shell-inner">
                <div className="am-navbar">
                  <Icon type="close" />
                  <div className="am-navbar-title">{btn.label}</div>
                  <div className="am-navbar-title">{config.setting.title}</div>
                </div>
                <DragElement
                  list={config.fields}
@@ -454,21 +449,6 @@
            inputSubmit={this.settingSave}
            wrappedComponentRef={(inst) => this.settingRef = inst}
          />
        </Modal>
        <Modal
          bodyStyle={{textAlign: 'center', color: '#000000', fontSize: '16px'}}
          closable={false}
          maskClosable={false}
          visible={this.state.closeVisible}
          onCancel={() => { this.setState({closeVisible: false}) }}
          footer={[
            <Button key="save" className="mk-btn mk-green" loading={this.state.closeloading} onClick={this.submitConfig}>{this.state.dict['model.save']}</Button>,
            <Button key="confirm" className="mk-btn mk-yellow" onClick={this.props.handleBack}>{this.state.dict['model.notsave']}</Button>,
            <Button key="cancel" onClick={() => { this.setState({closeVisible: false}) }}>{this.state.dict['model.cancel']}</Button>
          ]}
          destroyOnClose
        >
          {this.state.dict['header.menu.config.placeholder']}
        </Modal>
      </div>
    )
src/mob/modalconfig/index.scss
@@ -160,7 +160,7 @@
          position: absolute;
          line-height: 45px;
          font-size: 18px;
          left: 10px;
          right: 10px;
        }
        .am-navbar-title {
          font-size: 16px;
@@ -178,6 +178,7 @@
      .modal-fields-row {
        min-height: calc(100% - 95px);
        padding: 0 10px 35px;
      }
      .modal-form {
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -1709,6 +1709,7 @@
          visible={visible}
          placement={btnconfig.setting.placement || 'right'}
          bodyStyle={{ paddingBottom: 80 }}
          destroyOnClose
        >
          <MutilForm
            BID={BID}
@@ -1770,7 +1771,7 @@
  render() {
    const { btn, show, style } = this.props
    const { loadingNumber, loading, visible, disabled } = this.state
    const { loadingNumber, loading, disabled } = this.state
    if (show === 'actionList') {
      return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}>
@@ -1782,7 +1783,7 @@
          className={'mk-btn mk-' + btn.class}
          onClick={() => {this.actionTrigger()}}
        >{(loadingNumber ? `(${loadingNumber})` : '') + btn.label}</Button>
        {visible ? this.getModels() : null}
        {this.getModels()}
      </div>
    } else if (show && show.indexOf('plus') > -1) {
      return <div className="mk-btn-wrap">
@@ -1793,7 +1794,7 @@
          style={{fontSize: show.substring(4) + 'px'}}
          onClick={() => {this.actionTrigger()}}
        ></Button>
        {visible ? this.getModels() : null}
        {this.getModels()}
      </div>
    } else { // icon、text、 all 卡片
      return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}>
@@ -1806,7 +1807,7 @@
          icon={show === 'text' ? '' : (btn.icon || '')}
          onClick={() => {this.actionTrigger()}}
        >{show === 'icon' && btn.icon ? '' : btn.label}</Button>
        {visible ? this.getModels() : null}
        {this.getModels()}
      </div>
    }
  }
src/templates/zshare/formconfig.jsx
@@ -2633,10 +2633,10 @@
        text: '禁用'
      }, {
        value: 'simple',
        text: '单次扫码'
        text: '单次'
      }, {
        value: 'multi',
        text: '连续扫码'
        text: '连续'
      }],
      forbid: appType !== 'mob'
    },
src/views/appmanage/index.jsx
@@ -125,7 +125,7 @@
          <div>
            <Button type="link" onClick={() => this.deleteSubApp(record)} style={{color: '#ff4d4f'}}>删除</Button>
            <Button type="link" onClick={() => this.jumpApp(record)}>编辑应用</Button>
            <Paragraph style={{display: 'inline-block', margin: 0}} copyable={{ text: `${base_url}${record.typename}/index.html#/index/${this.state.selectApp.kei_no}/${record.lang}` }}></Paragraph>
            <Paragraph style={{display: 'inline-block', margin: 0}} copyable={{ text: `${base_url}${record.typename === 'pad' ? 'mob' : record.typename}/index.html#/index/${this.state.selectApp.kei_no}/${record.lang}` }}></Paragraph>
          </div>
        )
      },
src/views/mobdesign/index.jsx
@@ -373,10 +373,11 @@
    })
    this.setState({
      config: {...config, components: []}
      config: {...config, components},
      comloading: true
    }, () => {
      this.setState({
        config: {...config, components: components}
        comloading: false
      })
    })
  }
@@ -1102,8 +1103,9 @@
        if (res.status) {
          config.open_edition = res.open_edition || ''
          this.setState({
            config,
            oriConfig: fromJS(config).toJS(),
          })
@@ -1222,10 +1224,10 @@
            copyButtons: [],
            thawButtons: [],
            menuloading: false,
            config: {...config, components: []}
            comloading: true
          }, () => {
            this.setState({
              config: {...this.state.config, components: this.state.oriConfig.components}
              comloading: false
            })
          })
          notification.success({
@@ -1520,9 +1522,9 @@
              <Button type="default" onClick={this.closeView}>关闭</Button>
            </div>
            <div className={'menu-body ' + (menuloading ? 'saving' : '')}>
              <div className="mob-shell" style={{width: window.GLOB.shellWidth, height: window.GLOB.shellHeight}}>
                {config && !comloading ? <MobShell menu={config} handleList={this.updateConfig} /> : null}
              </div>
              {config && !comloading ? <div className="mob-shell" style={{width: window.GLOB.shellWidth, height: window.GLOB.shellHeight}}>
                <MobShell menu={config} handleList={this.updateConfig} />
              </div> : null}
            </div>
          </DndProvider>
          <StyleController />
src/views/pcdesign/index.jsx
@@ -68,6 +68,7 @@
    customComponents: [],
    settingshow: sessionStorage.getItem('settingshow') !== 'false',
    controlshow: sessionStorage.getItem('controlshow') !== 'false',
    comloading: false
  }
  UNSAFE_componentWillMount() {
@@ -379,10 +380,11 @@
    })
    this.setState({
      config: {...config, components: []}
      config: {...config, components},
      comloading: true
    }, () => {
      this.setState({
        config: {...config, components: components}
        comloading: false
      })
    })
  }
@@ -1130,6 +1132,7 @@
          config.open_edition = res.open_edition || ''
          this.setState({
            config,
            oriConfig: fromJS(config).toJS(),
          })
@@ -1248,10 +1251,10 @@
            copyButtons: [],
            thawButtons: [],
            menuloading: false,
            config: {...config, components: []}
            comloading: true
          }, () => {
            this.setState({
              config: {...this.state.config, components: this.state.oriConfig.components}
              comloading: false
            })
          })
          notification.success({
@@ -1465,7 +1468,7 @@
  }
  render () {
    const { localedict, loading, activeKey, settingshow, controlshow, dict, MenuId, config, menuloading, customComponents } = this.state
    const { localedict, loading, comloading, activeKey, settingshow, controlshow, dict, MenuId, config, menuloading, customComponents } = this.state
    return (
      <ConfigProvider locale={localedict}>
@@ -1523,7 +1526,7 @@
              <Button type="default" onClick={this.closeView}>关闭</Button>
            </div>
            <div className={'menu-body ' + (menuloading ? 'saving' : '')}>
              {config && config.components ? <MenuShell menu={config} handleList={this.updateConfig} /> : null}
              {config && !comloading ? <MenuShell menu={config} handleList={this.updateConfig} /> : null}
            </div>
          </DndProvider>
          <StyleController />