king
2022-05-23 0d63712b03fc8b8542da904b67c6bea133b4f9d8
移动端状态栏与字段黑名单
8个文件已修改
90 ■■■■■ 已修改文件
public/options.json 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/mkTable/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/tab-form/index.jsx 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/topbar/normal-navbar/options.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/searchconfig/settingform/index.jsx 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/options.json
@@ -1,18 +1,18 @@
{
  "appId": "202108312122504607B107A83F55B40C98CCF",
  "appkey": "20210831212235413F287EC3BF489424496C8",
  "appId": "201912040924165801464FF1788654BC5AC73",
  "appkey": "20191106103859640976D6E924E464D029CF0",
  "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars",
  "systemType": "",
  "externalDatabase": "false",
  "lineColor": "",
  "filter": "false",
  "defaultApp": "mkindustry",
  "defaultApp": "mk",
  "defaultLang": "zh-CN",
  "WXAppID": "",
  "debugger": false,
  "licenseKey": "7EFE13KIKLILIJB64C12",
  "probation": "2021-12-31",
  "licenseKey": "",
  "probation": "",
  "keepPassword": "true",
  "host": "http://demo.mk9h.cn",
  "service": "erp_new/"
  "host": "http://qingqiumarket.cn",
  "service": "MKWMS/"
}
src/components/normalform/modalform/index.jsx
@@ -263,7 +263,7 @@
      } else if (item.type === 'source') {
        content = (<SourceComponent type="" placement="right"/>)
      } else if (item.type === 'table') {
        content = (<MKTable columns={item.columns || []} actions={item.actions || []}/>)
        content = (<MKTable tip={item.tip || ''} columns={item.columns || []} actions={item.actions || []}/>)
      }
      if (!content) return
src/components/normalform/modalform/mkTable/index.jsx
@@ -452,6 +452,7 @@
              })}
            />
          </DndProvider>
          {this.props.tip ? this.props.tip : null}
        </div>
      </EditableContext.Provider>
    )
src/menu/components/form/tab-form/index.jsx
@@ -673,6 +673,30 @@
    this.updateComponent({...this.state.card, wrap: res})
  }
  clearGroup = () => {
    let group = fromJS(this.state.group).toJS()
    let card = fromJS(this.state.card).toJS()
    let _this = this
    group.fields = []
    card.subcards = card.subcards.map(item => {
      if (item.uuid === group.uuid) {
        return group
      }
      return item
    })
    confirm({
      content: `确定清空表单吗?`,
      onOk() {
        _this.setState({card, group})
        _this.props.updateConfig(card)
      },
      onCancel() {}
    })
  }
  clickComponent = (e) => {
    if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
      e.stopPropagation()
@@ -714,6 +738,7 @@
        {group ? <div className="form-area">
          <PlusOutlined className="plus" title="添加表单" onClick={this.addForm}/>
          <FieldsComponent config={group} type="form" plusFields={this.plusFields} />
          <span style={{color: 'red', marginLeft: '30px', cursor: 'pointer'}} onClick={this.clearGroup}>清空</span>
          <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} />
          {appType !== 'mob' ? <Button className="mk-cols-change" onClick={() => this.changecols(1)}>1列</Button> : null}
          {appType !== 'mob' ? <Button className="mk-cols-change" onClick={() => this.changecols(2)}>2列</Button> : null}
src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx
@@ -415,7 +415,8 @@
      label: Formdict['header.form.blacklist'],
      initVal: card.blacklist || [],
      required: false,
      options: roleList
      options: roleList,
      forbidden: appType === 'mob'
    }
  ]
}
src/mob/components/topbar/normal-navbar/options.jsx
@@ -56,7 +56,8 @@
      field: 'title',
      label: '标题',
      initval: wrap.title || '',
      tooltip: '使用搜索框时,标题用于搜索条件隐藏时(当启用黑名单,登录用户无权限时)显示。',
      // tooltip: '使用搜索框时,标题用于搜索条件隐藏时(当启用黑名单,登录用户无权限时)显示。注:@username代表用户名,@fullname代表姓名。',
      tooltip: '注:@username代表用户名,@fullname代表姓名。',
      required: false
    },
    {
@@ -64,7 +65,7 @@
      field: 'menuPosition',
      label: '菜单位置',
      initval: wrap.menuPosition || 'right',
      tooltip: '自定义菜单的位置。',
      tooltip: '自定义菜单的位置。注:菜单位于左侧时会显示头像,且返回功能被禁用。',
      required: false,
      options: [
        {value: 'left', label: '左侧'},
@@ -188,6 +189,7 @@
      required: false,
      span: 24,
      actions: ['view'],
      tip: <span style={{fontSize: '12px', color: '#959595', position: 'relative', top: '-8px'}}>当使用图标<MkIcon type="user"/>,且右侧只有一个菜单时,会显示用户头像。</span>,
      columns: [
        {
          title: '图标',
src/mob/searchconfig/settingform/index.jsx
@@ -1,6 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Input, Radio, Select, Tooltip } from 'antd'
import { Form, Row, Col, Input, Radio, Tooltip } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import asyncComponent from '@/utils/asyncComponent'
@@ -16,23 +16,23 @@
  }
  state = {
    roleList: [],
    // roleList: [],
    type: this.props.config.setting.type || 'title'
  }
  UNSAFE_componentWillMount() {
    let roleList = sessionStorage.getItem('sysRoles')
    if (roleList) {
      try {
        roleList = JSON.parse(roleList)
      } catch (e) {
        roleList = []
      }
    } else {
      roleList = []
    }
    // let roleList = sessionStorage.getItem('sysRoles')
    // if (roleList) {
    //   try {
    //     roleList = JSON.parse(roleList)
    //   } catch (e) {
    //     roleList = []
    //   }
    // } else {
    //   roleList = []
    // }
    this.setState({roleList})
    // this.setState({roleList})
  }
  handleConfirm = () => {
@@ -59,7 +59,7 @@
  render() {
    const { config } = this.props
    const { getFieldDecorator } = this.props.form
    const { type, roleList } = this.state
    const { type } = this.state
    const formItemLayout = {
      labelCol: {
@@ -234,7 +234,8 @@
              )}
            </Form.Item>
          </Col>
          {type === 'search' ? <Col span={12}>
          {/* 去除移动端字段权限 */}
          {/* {type === 'search' ? <Col span={12}>
            <Form.Item label="黑名单">
              {getFieldDecorator('blacklist', {
                initialValue: config.setting.blacklist || []
@@ -250,7 +251,7 @@
                </Select>
              )}
            </Form.Item>
          </Col> : null}
          </Col> : null} */}
        </Row>
      </Form>
    )
src/templates/zshare/formconfig.jsx
@@ -846,7 +846,8 @@
      label: Formdict['header.form.blacklist'],
      initVal: card.blacklist || [],
      required: false,
      options: roleList || []
      options: roleList || [],
      forbid: appType === 'mob'
    }
  ]
}
@@ -3487,7 +3488,8 @@
      label: Formdict['header.form.blacklist'],
      initVal: card.blacklist || [],
      required: false,
      options: roleList
      options: roleList,
      forbid: appType === 'mob'
    }
  ]
}