king
2022-05-09 28ebe609e47b28794450cefc72d3e0f62fd904e7
2022-05-09
11个文件已修改
132 ■■■■ 已修改文件
src/menu/components/card/cardcellcomponent/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/funcMegvii/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/actionform/index.jsx 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifymegvii/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/index.jsx 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/index.jsx 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/createinterface/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/index.jsx
@@ -12,6 +12,7 @@
import MKEmitter from '@/utils/events.js'
import MenuUtils from '@/utils/utils-custom.js'
import ElementForm from './elementform'
import CreateFunc from '@/templates/zshare/createfunc'
import DragElement from './dragaction'
import './index.scss'
@@ -41,6 +42,7 @@
    visible: false,      // 模态框控制
    actvisible: false,   // 按钮编辑模态框
    profVisible: false,  // 验证信息编辑
    record: null
  }
  /**
@@ -627,7 +629,7 @@
  render() {
    const { cards, cardCell } = this.props
    const { elements, visible, actvisible, profVisible, card, dict } = this.state
    const { elements, visible, actvisible, profVisible, card, dict, record } = this.state
    return (
      <div className="model-menu-card-cell-list">
@@ -672,6 +674,7 @@
            maskClosable={false}
            onCancel={this.editModalCancel}
            footer={[
              record && record.intertype === 'inner' ? <CreateFunc key="create" dict={dict} ref="btnCreatFunc" trigger={this.creatFunc}/> : null,
              <Button key="cancel" onClick={this.editModalCancel}>{dict['model.cancel']}</Button>,
              <Button key="confirm" type="primary" onClick={this.handleActionSubmit}>{dict['model.confirm']}</Button>
            ]}
@@ -684,6 +687,7 @@
              formlist={this.state.formlist}
              inputSubmit={this.handleActionSubmit}
              setting={cards.setting}
              updRecord={(record) => this.setState({record: fromJS(record).toJS()})}
              wrappedComponentRef={(inst) => this.actionFormRef = inst}
            />
          </Modal>
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -30,7 +30,8 @@
    setting: PropTypes.object,   // 页面设置
    formlist: PropTypes.any,     // 表单信息
    card: PropTypes.any,         // 按钮信息
    inputSubmit: PropTypes.any   // 回车提交事件
    inputSubmit: PropTypes.func, // 回车提交事件
    updRecord: PropTypes.func    // 更新信息
  }
  state = {
@@ -140,6 +141,7 @@
        }
      }, 100)
    }
    this.props.updRecord && this.props.updRecord(this.record)
  }
  getMutilOptions = (requireOptions) => {
@@ -489,6 +491,8 @@
        this.record.control = ''
        _fieldval.control = ''
      }
      this.props.updRecord && this.props.updRecord(this.record)
    } else if (key === 'funcType') {
      if (value === 'print') {
        _fieldval.label = '打印'
@@ -553,6 +557,8 @@
      }
    } else if (key === 'intertype') {
      this.record.sysInterface = 'false'
      this.props.updRecord && this.props.updRecord(this.record)
    } else if (key === 'sysInterface') {
      if (value === 'true') {
        _fieldval.interface = window.GLOB.mainSystemApi || ''
src/menu/components/share/actioncomponent/index.jsx
@@ -38,7 +38,8 @@
    formlist: null,      // 表单信息
    actionlist: null,    // 按钮组
    visible: false,      // 模态框控制
    profVisible: false   // 验证信息模态框
    profVisible: false,  // 验证信息模态框
    record: null
  }
  /**
@@ -494,7 +495,7 @@
  render() {
    const { config, type } = this.props
    const { actionlist, visible, appType, card, dict, profVisible } = this.state
    const { actionlist, visible, appType, card, dict, profVisible, record } = this.state
    return (
      <div className={'model-menu-action-list'}>
@@ -511,14 +512,13 @@
        />
        {/* 编辑按钮:复制、编辑 */}
        <Modal
          // title={dict['model.action'] + '-' + (card && card.copyType === 'action' ? dict['model.copy'] : dict['model.edit'])}
          title="按钮·编辑"
          visible={visible}
          width={850}
          maskClosable={false}
          onCancel={this.editModalCancel}
          footer={[
            <CreateFunc key="create" dict={dict} ref="btnCreatFunc" trigger={this.creatFunc}/>,
            record && record.intertype === 'inner' ? <CreateFunc key="create" dict={dict} ref="btnCreatFunc" trigger={this.creatFunc}/> : null,
            <Button key="cancel" onClick={this.editModalCancel}>{dict['model.cancel']}</Button>,
            <Button key="confirm" type="primary" onClick={this.handleSubmit}>{dict['model.confirm']}</Button>
          ]}
@@ -530,6 +530,7 @@
            formlist={this.state.formlist}
            inputSubmit={this.handleSubmit}
            setting={config.setting}
            updRecord={(record) => this.setState({record: fromJS(record).toJS()})}
            wrappedComponentRef={(inst) => this.actionFormRef = inst}
          />
        </Modal>
src/tabviews/zshare/actionList/funcMegvii/index.jsx
@@ -233,7 +233,7 @@
            id: item.id || '',
            card_number: item.card_number || '',
            person_code: item.person_code || '',
            group_list: item.group_list ? item.group_list.split(',') : [],
            group_list: item.group_list ? item.group_list.split(',') : [1],
            password: item.password || '',
            id_number: item.id_number || '',
            face_list: [{
@@ -262,8 +262,6 @@
      error = '人员名称不可为空'
    } else if (!data.id) {
      error = '人员id不可为空'
    } else if (data.group_list.length === 0) {
      error = '人员分组不可为空'
    } else if (!data.face_list[0].data) {
      error = '人员图片不可为空'
    } else if (data.password) {
src/templates/formtabconfig/index.jsx
@@ -756,13 +756,7 @@
      let newLText = Utils.formatOptions(FuncUtils.getTableFunc(setting, menu, _config)) // 创建存储过程sql
      let DelText = Utils.formatOptions(FuncUtils.dropfunc(setting.innerFunc))          // 删除存储过程sql
      this.refs.tableCreatFunc.exec(setting.innerFunc, newLText, DelText).then(result => {
        if (result === 'success') {
          this.setState({
            config: _config
          })
        }
      })
      this.refs.tableCreatFunc.exec(setting.innerFunc, newLText, DelText)
    })
  }
src/templates/sharecomponent/actioncomponent/actionform/index.jsx
@@ -30,7 +30,8 @@
    setting: PropTypes.object,   // 页面设置
    formlist: PropTypes.any,     // 表单信息
    card: PropTypes.any,         // 按钮信息
    inputSubmit: PropTypes.any   // 回车提交事件
    inputSubmit: PropTypes.func, // 回车提交事件
    updRecord: PropTypes.func
  }
  state = {
@@ -126,6 +127,8 @@
        console.warn('表单focus失败!')
      }
    }
    this.props.updRecord && this.props.updRecord(this.record)
  }
  getMutilOptions = () => {
@@ -385,6 +388,8 @@
      if (!['funcbutton', 'excelIn', 'excelOut'].includes(value)) {
        _fieldval.position = 'toolbar'
      }
      this.props.updRecord && this.props.updRecord(this.record)
    } else if (key === 'position') {
      if (value === 'grid') {
        _fieldval.Ot = 'requiredSgl'
@@ -439,6 +444,8 @@
      }
    } else if (key === 'intertype') {
      this.record.sysInterface = 'false'
      this.props.updRecord && this.props.updRecord(this.record)
    } else if (key === 'sysInterface') {
      if (value === 'true') {
        _fieldval.interface = window.GLOB.mainSystemApi || ''
src/templates/sharecomponent/actioncomponent/index.jsx
@@ -45,7 +45,8 @@
    copying: false,      // 按钮复制中
    visible: false,      // 模态框控制
    printTemps: [],      // 单据打印模板
    profVisible: false   // 验证信息模态框
    profVisible: false,  // 验证信息模态框
    record: null
  }
  /**
@@ -906,7 +907,7 @@
  render() {
    const { config } = this.props
    const { actionlist, visible, card, dict, copying, profVisible } = this.state
    const { actionlist, visible, card, dict, copying, profVisible, record } = this.state
    return (
      <div className="model-table-action-list" style={config.charts.length > 1 ? {paddingTop: 25} : null}>
@@ -931,8 +932,8 @@
          maskClosable={false}
          onCancel={this.editModalCancel}
          footer={[
            <CreateInterface key="interface" dict={dict} ref="btnCreatInterface" trigger={this.btnCreatInterface}/>,
            <CreateFunc key="create" dict={dict} ref="btnCreatFunc" trigger={this.creatFunc}/>,
            record && ['pop', 'exec', 'prompt'].includes(record.OpenType) && record.intertype === 'system' ? <CreateInterface key="interface" dict={dict} ref="btnCreatInterface" trigger={this.btnCreatInterface}/> : null,
            record && record.intertype === 'inner' ? <CreateFunc key="create" dict={dict} ref="btnCreatFunc" trigger={this.creatFunc}/> : null,
            <Button key="cancel" onClick={this.editModalCancel}>{dict['model.cancel']}</Button>,
            <Button key="confirm" type="primary" loading={copying} onClick={this.handleSubmit}>{dict['model.confirm']}</Button>
          ]}
@@ -944,6 +945,7 @@
            formlist={this.state.formlist}
            inputSubmit={this.handleSubmit}
            setting={config.setting}
            updRecord={(record) => this.setState({record: fromJS(record).toJS()})}
            wrappedComponentRef={(inst) => this.actionFormRef = inst}
          />
        </Modal>
src/templates/sharecomponent/actioncomponent/verifymegvii/index.jsx
@@ -47,8 +47,8 @@
    excelData: [
      {field: 'id', datatype: 'string', type: 'nvarchar(50)', required: '必须', remark: '人员id'},
      {field: 'person_name', datatype: 'string', type: 'nvarchar(50)', required: '必须', remark: '人员名称'},
      {field: 'group_list', datatype: 'string', type: 'nvarchar(50)', required: '必须', remark: '绑定人员组的列表,多个使用逗号分隔,示例:\'1,2\''},
      {field: 'face_data', datatype: 'string', type: 'text', required: '必须', remark: 'Base64编码的照片数据(人脸信息)'},
      {field: 'group_list', datatype: 'string', type: 'nvarchar(50)', required: '非必须', remark: '绑定人员组的列表,多个使用逗号分隔,示例:\'1,2\''},
      {field: 'face_idx', datatype: 'integer', type: 'int', required: '非必须', remark: '照片索引,默认为0'},
      {field: 'is_admin', datatype: 'string', type: 'nvarchar(50)', required: '非必须', remark: '是否启用管理员权限,默认为\'false\''},
      {field: 'recognition_type', datatype: 'string', type: 'nvarchar(50)', required: '非必须', remark: '人员类型,staff – 普通人员(默认),visitor – 访客,blacklist – 黑名单'},
src/templates/sharecomponent/settingcomponent/index.jsx
@@ -28,7 +28,9 @@
    search: null,        // 搜索条件,包括主表搜索
    formlist: null,      // 表单信息
    visible: false,      // 模态框控制
    loading: false       // 设置信息验证保存中
    loading: false,      // 设置信息验证保存中
    record: null
  }
  /**
@@ -84,17 +86,13 @@
    const { config } = this.props
    const { menu } = this.state
    this.settingRef.handleConfirm('func').then(setting => {
    this.settingRef.handleConfirm('loading').then(setting => {
      let res = this.resetSetting(setting)
      let _config = {...config, setting: res}
      let newLText = Utils.formatOptions(FuncUtils.getTableFunc(setting, menu, _config)) // 创建存储过程sql
      let DelText = Utils.formatOptions(FuncUtils.dropfunc(setting.innerFunc))          // 删除存储过程sql
      this.refs.funcCreatComponent.exec(setting.innerFunc, newLText, DelText).then(result => {
        if (result === 'success') {
          this.props.updatesetting(_config)
        }
      })
      this.refs.funcCreatComponent.exec(setting.innerFunc, newLText, DelText)
    })
  }
@@ -105,7 +103,7 @@
    const { config } = this.props
    const { menu } = this.state
    this.settingRef.handleConfirm('interface').then(setting => {
    this.settingRef.handleConfirm('loading').then(setting => {
      let res = this.resetSetting(setting)
      let _config = {...config, setting: res}
      let _menu = {
@@ -169,7 +167,7 @@
  render() {
    const { config } = this.props
    const { dict, visible, search, menu } = this.state
    const { dict, visible, search, menu, record } = this.state
    return (
      <div className="model-menu-setting">
@@ -183,8 +181,8 @@
          maskClosable={false}
          onCancel={() => { this.setState({ visible: false, loading: false })}}
          footer={[
            <CreateInterface key="interface" loading={this.state.interloading} dict={dict} ref="tableCreatInterface" trigger={this.tableCreatInterface}/>,
            <CreateFunc key="create" dict={dict} ref="funcCreatComponent" trigger={this.tableCreatFunc}/>,
            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="confirm" type="primary" loading={this.state.loading} onClick={this.settingSave}>{this.state.dict['model.confirm']}</Button>
          ]}
@@ -195,6 +193,7 @@
            menu={menu}
            config={config}
            search={search}
            updRecord={(record) => this.setState({record: fromJS(record).toJS()})}
            wrappedComponentRef={(inst) => this.settingRef = inst}
          />
        </Modal>
src/templates/sharecomponent/settingcomponent/settingform/index.jsx
@@ -20,7 +20,8 @@
    dict: PropTypes.object,         // 字典项
    menu: PropTypes.object,         // 菜单信息
    config: PropTypes.object,       // 页面配置信息
    search: PropTypes.array         // 搜索条件
    search: PropTypes.array,        // 搜索条件
    updRecord: PropTypes.func
  }
  state = {
@@ -126,6 +127,10 @@
      cbScripts: _cbScripts,
      status
    })
  }
  componentDidMount () {
    this.props.updRecord(this.state.status)
  }
  getRegOptions = (searches) => {
@@ -257,26 +262,6 @@
    if (activeKey === 'setting') {
      return new Promise((resolve, reject) => {
        this.settingForm.handleConfirm().then(res => {
          if (trigger === 'func' && res.interType !== 'inner') {
            notification.warning({
              top: 92,
              message: '使用内部接口,才可以创建存储过程!',
              duration: 5
            })
            this.setState({loading: false})
            reject()
            return
          } else if (trigger === 'interface' && res.interType !== 'system') {
            notification.warning({
              top: 92,
              message: '使用系统接口时,才可以创建接口!',
              duration: 5
            })
            this.setState({loading: false})
            reject()
            return
          }
          this.setState({
            setting: res
          }, () => {
@@ -295,23 +280,13 @@
      })
    } else if (activeKey === 'scripts') {
      return new Promise((resolve, reject) => {
        if (trigger === 'func' && setting.interType !== 'inner') {
          notification.warning({
            top: 92,
            message: '使用内部接口,才可以创建存储过程!',
            duration: 5
          })
        this.sqlverify(() => {
          this.setState({loading: false})
          resolve({...setting, scripts, preScripts, cbScripts})
        }, () => {
          this.setState({loading: false})
          reject()
        } else {
          this.sqlverify(() => {
            this.setState({loading: false})
            resolve({...setting, scripts, preScripts, cbScripts})
          }, () => {
            this.setState({loading: false})
            reject()
          }, 'submit')
        }
        }, 'submit')
      })
    } else {
      this.setState({loading: false})
@@ -519,7 +494,9 @@
  }
  updateStatus = (status) => {
    this.setState({status: {...this.state.status, ...status}})
    let _status = {...this.state.status, ...status}
    this.setState({status: _status})
    this.props.updRecord(_status)
  }
  render() {
src/templates/zshare/createinterface/index.jsx
@@ -11,7 +11,7 @@
import Api from '@/api'
import './index.scss'
class CreateFunc extends Component {
class CreateInterface extends Component {
  static propTypes = {
    dict: PropTypes.object,  // 字典项
    trigger: PropTypes.func
@@ -1135,4 +1135,4 @@
  }
}
export default CreateFunc
export default CreateInterface