king
2021-07-20 0d240ba775efbb3e414ce2d9c30a902c1392bb09
2021-07-20
14个文件已修改
122 ■■■■■ 已修改文件
src/assets/img/rolemanage.jpg 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tabview/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/replaceField/index.jsx 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/menuconfig/editthdmenu/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/index.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/editcomponent/index.jsx 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/option.js 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/appmanage/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/appmanage/index.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/interface/workspace/request/index.jsx 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/interface/workspace/request/index.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/img/rolemanage.jpg

src/components/tabview/index.jsx
@@ -137,6 +137,8 @@
      return (<TabManage MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID}/>)
    } else if (view.type === 'RolePermission') {
      return (<RoleManage MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID}/>)
    } else if (view.type === 'appRolePermission') {
      return (<RoleManage MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID}/>)
    } else if (view.type === 'FormTab') {
      return (<FormTab MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID} param={view.param}/>)
    } else if (view.type === 'iframe') {
src/index.js
@@ -57,7 +57,7 @@
sessionStorage.setItem('role_id', sessionStorage.getItem('localRole_id') || '')
sessionStorage.setItem('dataM', sessionStorage.getItem('localDataM') || '')
// 新系统文件置于admin中 ../options.json
// 新系统文件置于admin中 ../options.json , { cache: 'no-cache'}
fetch('../options.json')
  .then(response => response.json())
src/menu/replaceField/index.jsx
@@ -166,7 +166,7 @@
  
              if (item.subcards) {
                item.subcards.forEach(card => {
                  if (card.elements) {
                  if (card.elements) { // 卡片
                    card.elements = card.elements.map(m => {
                      if (m.datatype === 'dynamic' && map[m.field]) {
                        m.field = map[m.field].FieldName
@@ -183,7 +183,7 @@
                    })
                  }
  
                  if (card.backElements) {
                  if (card.backElements) { // 卡片
                    card.backElements = card.backElements.map(m => {
                      if (m.datatype === 'dynamic' && map[m.field]) {
                        m.field = map[m.field].FieldName
@@ -195,6 +195,15 @@
                          }
                          return col
                        })
                      }
                      return m
                    })
                  }
                  if (card.fields) { // 表单
                    card.fields = card.fields.map(m => {
                      if (map[m.field]) {
                        m.field = map[m.field].FieldName
                      }
                      return m
                    })
@@ -305,6 +314,29 @@
          }
      
          config.components = _replace(config.components)
        } else if (this.props.type === 'table') {
          config.columns = config.columns.map(col => {
            if (col.field && map[col.field]) {
              col.field = map[col.field].FieldName
            }
            return col
          })
          config.search = config.search.map(col => {
            if (col.field && map[col.field]) {
              col.field = map[col.field].FieldName
            }
            if (col.datefield && map[col.datefield]) {
              col.datefield = map[col.datefield].FieldName
            }
            return col
          })
        } else if (this.props.type === 'form') {
          config.fields = config.fields.map(col => {
            if (col.field && map[col.field]) {
              col.field = map[col.field].FieldName
            }
            return col
          })
        }
        this.setState({
src/templates/comtableconfig/index.jsx
@@ -26,6 +26,7 @@
const { Panel } = Collapse
const { confirm } = Modal
const UrlFieldComponent = asyncComponent(() => import('@/menu/urlfieldcomponent'))
const ReplaceField = asyncComponent(() => import('@/menu/replaceField'))
const EditComponent = asyncComponent(() => import('@/templates/zshare/editcomponent'))
const SettingComponent = asyncComponent(() => import('@/templates/sharecomponent/settingcomponent'))
const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent'))
@@ -1205,6 +1206,7 @@
              </div>
            } bordered={false} extra={
              <div>
                <ReplaceField type="table" config={config} updateConfig={this.updateconfig}/>
                <EditComponent dict={this.state.dict} options={['search', 'action', 'columns']} config={this.state.config} MenuID={this.props.menu.MenuID} thawButtons={this.state.thawButtons} refresh={this.editConfig}/>
                <Switch className="big" checkedChildren={this.state.dict['model.enable']} unCheckedChildren={this.state.dict['model.disable']} checked={this.state.config.enabled} onChange={this.onEnabledChange} />
                <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['model.save']}</Button>
src/templates/menuconfig/editthdmenu/index.jsx
@@ -560,7 +560,7 @@
        } else if (temp.Template === 'CustomPage' && memberLevel < 20) {
          return
        }
        _templates.push({
          uuid: temp.MenuID,
          title: temp.MenuName,
@@ -612,7 +612,7 @@
    let sysTemplates = fromJS(this.state.sysTemplates).toJS()
    // 角色权限分配模板,只可以添加一次
    if (sysMenu.isSystem && sysMenu.Template === 'RolePermission') {
    if (sysMenu.isSystem && (sysMenu.Template === 'RolePermission')) {
      sysTemplates = sysTemplates.map(temp => {
        if (temp.type === sysMenu.type) {
          temp.hidden = true
src/templates/modalconfig/index.jsx
@@ -24,6 +24,8 @@
const { Panel } = Collapse
const { confirm } = Modal
const CommonDict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
const ReplaceField = asyncComponent(() => import('@/menu/replaceField'))
const ModalForm = asyncComponent(() => import('@/templates/zshare/modalform'))
const EditComponent = asyncComponent(() => import('@/templates/zshare/editcomponent'))
const DragElement = asyncComponent(() => import('./dragelement'))
@@ -645,6 +647,7 @@
          <div className="setting">
            <Card title={dict['header.menu.form.configurable']} bordered={false} extra={
              <div>
                <ReplaceField type="form" config={config} updateConfig={this.updateconfig}/>
                <EditComponent dict={dict} options={['form']} config={this.state.config} refresh={this.updateEditConfig}/>
                <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{dict['model.save']}</Button>
                <Button onClick={this.cancelConfig}>{dict['model.back']}</Button>
src/templates/subtableconfig/index.jsx
@@ -26,6 +26,7 @@
const { Panel } = Collapse
const { confirm } = Modal
const ReplaceField = asyncComponent(() => import('@/menu/replaceField'))
const EditComponent = asyncComponent(() => import('@/templates/zshare/editcomponent'))
const SettingComponent = asyncComponent(() => import('@/templates/sharecomponent/settingcomponent'))
const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent'))
@@ -1008,6 +1009,7 @@
              </div>
            } bordered={false} extra={
              <div>
                <ReplaceField type="table" config={config} updateConfig={this.updateconfig}/>
                <EditComponent dict={this.state.dict} options={['search', 'action', 'columns']} config={config} MenuID={config.uuid} thawButtons={this.state.thawButtons} refresh={this.updateConfig}/>
                <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config.enabled} onChange={this.onEnabledChange} />
                <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['model.save']}</Button>
src/templates/zshare/editcomponent/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Menu, Dropdown, Icon, Modal, Spin, notification } from 'antd'
import { Modal, Spin, notification, Button } from 'antd'
import Api from '@/api'
import Utils from '@/utils/utils.js'
@@ -25,14 +25,6 @@
    thawVisible: false,
    thawbtnlist: null,
    pasteVisible: false,
  }
  handleMenuClick = e => {
    if (e.key === 'thaw') {
      this.handleThaw()
    } else if (e.key === 'paste') {
      this.setState({pasteVisible: true})
    }
  }
  /**
@@ -236,23 +228,22 @@
    })
  }
  handleMenuClick = e => {
    if (e.key === 'thaw') {
      this.handleThaw()
    } else if (e.key === 'paste') {
      this.setState({pasteVisible: true})
    }
  }
  render() {
    const { MenuID } = this.props
    const { dict } = this.state
    const menu = (
      <Menu onClick={this.handleMenuClick}>
        {MenuID ? <Menu.Item key="thaw"><Icon type="unlock" />{dict['header.form.thawbutton']}</Menu.Item> : null}
        <Menu.Item key="paste"><Icon type="snippets" />{dict['header.form.paste']}</Menu.Item>
      </Menu>
    )
    return (
      <div style={{display: 'inline-block'}}>
        <Dropdown overlay={menu} overlayClassName="edit-component-box">
          <span style={{color: '#1890ff', display: 'inline-block', height: 25}}>
            {dict['model.edit']} <Icon type="down" />
          </span>
        </Dropdown>
        {MenuID ? <Button className="mk-border-green" onClick={this.handleThaw} icon="unlock">{dict['header.form.thawbutton']}</Button> : null}
        <Button style={{borderColor: '#40a9ff', color: '#40a9ff'}} onClick={() => this.setState({pasteVisible: true})} icon="snippets">{dict['header.form.paste']}</Button>
        {/* 解冻按钮模态框 */}
        <Modal
          title={dict['header.form.thawbutton']}
src/utils/option.js
@@ -87,18 +87,18 @@
    isSystem: true
  },
  {
    title: '角色权限分配',
    type: 'RolePermission',
    url: rolemanage,
    isSystem: true,
    hidden: true
  },
  {
    title: '外部页面',
    type: 'NewPage',
    url: customImg,
    baseconfig: '',
    isSystem: true
  },
  {
    title: '角色权限分配',
    type: 'RolePermission',
    url: rolemanage,
    isSystem: true,
    hidden: true
  }
]
src/views/appmanage/index.jsx
@@ -74,7 +74,9 @@
    visible: false,
    subVisible: false,
    transcolumns: [
      { title: '传输号', dataIndex: 'VersionName', key: 'VersionName', align: 'left' },
      { title: '传输号', dataIndex: 'VersionName', key: 'VersionName', align: 'left', render: (text, record) => (
        <Paragraph copyable={{text}}>{text}</Paragraph>
      )},
      { title: '说明', dataIndex: 'ProgramName', key: 'ProgramName', align: 'left' },
      { title: '状态', dataIndex: 'StatusName', key: 'StatusName', align: 'left' },
      { title: '创建时间', dataIndex: 'CreateDate', key: 'CreateDate', align: 'left' },
src/views/appmanage/index.scss
@@ -38,6 +38,9 @@
          width: 250px;
          float: right;
        }
        .ant-typography, .ant-typography p {
          margin-bottom: 0;
        }
      }
      .trans-table.no-footer {
        .ant-pagination {
src/views/interface/workspace/request/index.jsx
@@ -202,12 +202,18 @@
    let keys = Object.keys(param).sort()
    let values = ''
    keys.forEach(key => {
      if (key.toLowerCase() === 'rduri' || key.toLowerCase() === 't') return
      if (param[key] === undefined) {
      if (key.toLowerCase() === 'rduri') return
      if (key.toLowerCase() === 't' || key.toLowerCase() === 'sign' || param[key] === undefined) {
        delete param[key]
      } else if (typeof(param[key]) === 'object') {
        return
      }
      if (typeof(param[key]) === 'object') {
        values += key + JSON.stringify(param[key])
      } else {
        if (param[key] && /: =$/.test(param[key])) {
          param[key] = param[key].replace(/: =$/, '==')
        }
        values += key + param[key]
      }
    })
@@ -256,7 +262,7 @@
          <Button type="primary" onClick={this.send}>Send</Button>
          <Button onClick={this.save}>Save</Button>
        </div>
        <Tabs animated={false}>
        <Tabs animated={false} defaultActiveKey={hasBody ? 'Body' : 'Params'}>
          <Tabs.TabPane forceRender={true} tab={<span className={hasParam ? 'active' : ''}>Params</span>} key="Params">
            <EditTable data={config.params} onChange={this.changeParams}/>
          </Tabs.TabPane>
@@ -285,7 +291,7 @@
        <div className="response">
          {response ? <div className="header">
            {body ? 'Body' : 'Response'}
            {status ? <span className="status">Status: <span className={status === '200OK' ? 'green' : ''}>{status}</span></span> : null}
            {status ? <span className="status">Status: <span className={status === '200OK' ? 'green' : 'yellow'}>{status}</span></span> : null}
          </div> : <div className="header">
            Response
            <span className="empty">Hit the Send button to get a response.</span>
src/views/interface/workspace/request/index.scss
@@ -132,6 +132,9 @@
        span.green {
          color: #26C281;
        }
        span.yellow {
          color: #fa541c;
        }
      }
    }
  }