king
2021-03-09 5c509746d48f326157542a784fd6d645e2dc9ae6
2021-03-09
10个文件已修改
2个文件已删除
406 ■■■■ 已修改文件
src/pc/bgcontroller/index.jsx 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/bgcontroller/index.scss 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/navbar/normal-navbar/index.jsx 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/navbar/normal-navbar/menusetting/menuform/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/navbar/normal-navbar/menusetting/menutable/index.jsx 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/navbar/normal-navbar/menusetting/menutable/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/padcontroller/index.jsx 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/padcontroller/index.scss 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/rolemanage/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-datamanage.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pcdesign/index.jsx 105 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pcdesign/index.scss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/bgcontroller/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Form } from 'antd'
import { Form, Icon } from 'antd'
import zhCN from '@/locales/zh-CN/mob.js'
import enUS from '@/locales/en-US/mob.js'
@@ -9,6 +9,7 @@
import './index.scss'
const ColorSketch = asyncComponent(() => import('@/mob/colorsketch'))
const StyleInput = asyncComponent(() => import('@/menu/stylecontroller/styleInput'))
const SourceComponent = asyncComponent(() => import('@/menu/components/share/sourcecomponent'))
class MobController extends Component {
@@ -57,6 +58,17 @@
    this.props.updateConfig(config)
  }
  /**
   * @description 修改背景颜色 ,颜色控件
   */
  changePadding = (val, type) => {
    let config = fromJS(this.props.config).toJS()
    config.style[type] = val
    this.props.updateConfig(config)
  }
  imgChange = (val) => {
    this.setState({
      backgroundImage: val
@@ -73,27 +85,84 @@
  }
  render () {
    const { config } = this.props
    const { backgroundColor, backgroundImage } = this.state
    const formItemLayout = {
      labelCol: {
        xs: { span: 24 },
        sm: { span: 4 }
        sm: { span: 5 }
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 20 }
        sm: { span: 19 }
      }
    }
    return (
      <div className="menu-background-controller">
      <div className="pc-style-controller">
        <Form {...formItemLayout}>
          <Form.Item className="color-control" colon={false} label="颜色">
          <Form.Item
            colon={false}
            label="宽度"
          >
            <StyleInput defaultValue={config.style.width || '100%'} options={['px', '%', 'vw']} onChange={(val) => this.changePadding(val, 'width')}/>
          </Form.Item>
          <Form.Item className="color-control" colon={false} label="背景色">
            <ColorSketch value={backgroundColor} onChange={this.changeBackgroundColor} />
          </Form.Item>
          <Form.Item colon={false} label="图片">
          <Form.Item colon={false} label="背景图">
            <SourceComponent value={backgroundImage} type="" placement="right" onChange={this.imgChange}/>
          </Form.Item>
          <p style={{borderBottom: '1px solid #eaeaea', color: '#40a9ff'}}>内边距</p>
          <Form.Item
            colon={false}
            label={<Icon title="上边距" type="arrow-up"/>}
          >
            <StyleInput defaultValue={config.style.paddingTop || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'paddingTop')}/>
          </Form.Item>
          <Form.Item
            colon={false}
            label={<Icon title="下边距" type="arrow-down"/>}
          >
            <StyleInput defaultValue={config.style.paddingBottom || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'paddingBottom')}/>
          </Form.Item>
          <Form.Item
            colon={false}
            label={<Icon title="左边距" type="arrow-left"/>}
          >
            <StyleInput defaultValue={config.style.paddingLeft || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'paddingLeft')}/>
          </Form.Item>
          <Form.Item
            colon={false}
            label={<Icon title="右边距" type="arrow-right"/>}
          >
            <StyleInput defaultValue={config.style.paddingRight || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'paddingRight')}/>
          </Form.Item>
          <p style={{borderBottom: '1px solid #eaeaea', color: '#40a9ff'}}>外边距</p>
          <Form.Item
            colon={false}
            label={<Icon title="上边距" type="arrow-up"/>}
          >
            <StyleInput defaultValue={config.style.marginTop || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'marginTop')}/>
          </Form.Item>
          <Form.Item
            colon={false}
            label={<Icon title="下边距" type="arrow-down"/>}
          >
            <StyleInput defaultValue={config.style.marginBottom || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'marginBottom')}/>
          </Form.Item>
          <Form.Item
            colon={false}
            label={<Icon title="左边距" type="arrow-left"/>}
          >
            <StyleInput defaultValue={config.style.marginLeft || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'marginLeft')}/>
          </Form.Item>
          <Form.Item
            colon={false}
            label={<Icon title="右边距" type="arrow-right"/>}
          >
            <StyleInput defaultValue={config.style.marginRight || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'marginRight')}/>
          </Form.Item>
        </Form>
      </div>
    )
src/pc/bgcontroller/index.scss
@@ -1,4 +1,4 @@
.menu-background-controller {
.pc-style-controller {
  width: 100%;
  height: 100%;
  overflow: hidden;
@@ -12,32 +12,8 @@
      top: 5px;
    }
  }
  .ant-form-item label > .anticon {
    font-size: 16px;
    vertical-align: middle;
  }
}
.margin-popover {
  padding-top: 0px;
  .ant-popover-inner-content {
    width: 90px;
    padding: 0px 5px;
    .ant-menu-root.ant-menu-vertical {
      border: 0;
      .ant-menu-item {
        height: 30px;
        cursor: pointer;
        line-height: 30px;
      }
      .ant-menu-item:not(:last-child) {
        margin-bottom: 0px;
      }
      .ant-menu-item:first-child {
        margin-top: 10px;
      }
      .ant-menu-item:last-child {
        margin-bottom: 10px;
      }
    }
  }
  .ant-popover-arrow {
    display: none;
  }
}
src/pc/components/navbar/normal-navbar/index.jsx
@@ -101,22 +101,6 @@
    this.props.updateConfig(component)
  }
  /**
   * @description 单个卡片信息更新
   */
  updateCard = (cell) => {
    let card = fromJS(this.state.card).toJS()
    card.subcards = card.subcards.map(item => {
      if (item.uuid === cell.uuid) return cell
      return item
    })
    this.setState({card})
    this.props.updateConfig(card)
  }
  getStyle = (comIds, style) => {
    const { card } = this.state
src/pc/components/navbar/normal-navbar/menusetting/menuform/index.jsx
@@ -109,6 +109,19 @@
            </Form.Item>
          </Col>
          <Col span={22}>
            <Form.Item label="菜单参数">
              {getFieldDecorator('MenuNo', {
                initialValue: menu.MenuNo || '',
                rules: [
                  {
                    required: true,
                    message: '请输入菜单参数!'
                  }
                ]
              })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
            </Form.Item>
          </Col>
          <Col span={22}>
            <Form.Item label="菜单属性">
              {getFieldDecorator('property', {
                initialValue: menu.property || 'menu'
src/pc/components/navbar/normal-navbar/menusetting/menutable/index.jsx
@@ -5,6 +5,7 @@
import MenuForm from '../menuform'
import Utils from '@/utils/utils.js'
import MKEmitter from '@/utils/events.js'
import './index.scss'
const { confirm } = Modal
@@ -20,6 +21,7 @@
    editMenu: null,
    columns: [
      { title: '菜单名称', dataIndex: 'name', key: 'name' },
      { title: '菜单参数', dataIndex: 'MenuNo', key: 'MenuNo' },
      { title: '菜单属性', dataIndex: 'property', key: 'property',  render: text => {
        const trans = {menu: '菜单', link: '链接', linkmenu: '关联菜单', classify: '分类'}
@@ -31,6 +33,10 @@
        const trans = {blank: '新窗口', self: '当前窗口'}
        return trans[text]
      }},
      { title: '是否隐藏', dataIndex: 'hidden', key: 'hidden',  render: (text, record) => {
        const trans = {'true': '是', 'false': '否'}
        return trans[text] || '否'
      }},
      { title: '操作', key: 'operation', align: 'center', width: '190px', render: (text, record) =>
        (<div>
@@ -91,6 +97,7 @@
        let _data = _this.state.data.filter(item => item.MenuID !== record.MenuID)
        _this.setState({data: _data})
        _this.props.menuUpdate({...menu, sublist: _data})
        MKEmitter.emit('delButtons', [record.MenuID])
      },
      onCancel() {}
    })
@@ -179,6 +186,7 @@
    editMenu: null,
    columns: [
      { title: '菜单名称', dataIndex: 'name', key: 'name' },
      { title: '菜单参数', dataIndex: 'MenuNo', key: 'MenuNo' },
      { title: '菜单属性', dataIndex: 'property', key: 'property',  render: text => {
        const trans = {menu: '菜单', link: '链接', linkmenu: '关联菜单', classify: '分类'}
@@ -190,6 +198,10 @@
        const trans = {blank: '新窗口', self: '当前窗口'}
        return trans[text]
      }},
      { title: '是否隐藏', dataIndex: 'hidden', key: 'hidden',  render: (text, record) => {
        const trans = {'true': '是', 'false': '否'}
        return trans[text] || '否'
      }},
      { title: '操作', key: 'operation', align: 'center', width: '190px', render: (text, record) =>
        (<div>
@@ -251,6 +263,12 @@
        let _data = _this.state.data.filter(item => item.MenuID !== record.MenuID)
        _this.setState({data: _data})
        _this.props.menuUpdate({...menu, sublist: _data})
        let uuids = [record.MenuID]
        record.sublist && record.sublist.forEach(item => {
          uuids.push(item.MenuID)
        })
        MKEmitter.emit('delButtons', uuids)
      },
      onCancel() {}
    })
@@ -355,6 +373,7 @@
    editMenu: null,
    columns: [
      { title: '菜单名称', dataIndex: 'name', key: 'name' },
      { title: '菜单参数', dataIndex: 'MenuNo', key: 'MenuNo' },
      { title: '菜单属性', dataIndex: 'property', key: 'property',  render: text => {
        const trans = {menu: '菜单', link: '链接', linkmenu: '关联菜单', classify: '分类'}
@@ -366,6 +385,10 @@
        const trans = {blank: '新窗口', self: '当前窗口'}
        return trans[text]
      }},
      { title: '是否隐藏', dataIndex: 'hidden', key: 'hidden',  render: (text, record) => {
        const trans = {'true': '是', 'false': '否'}
        return trans[text] || '否'
      }},
      { title: '操作', key: 'operation', align: 'center', width: '190px', render: (text, record) =>
        (<div>
@@ -421,6 +444,16 @@
      content: '',
      onOk() {
        _this.setState({data: data.filter(item => item.MenuID !== record.MenuID)})
        let uuids = [record.MenuID]
        record.sublist && record.sublist.forEach(item => {
          uuids.push(item.MenuID)
          item.sublist && item.sublist.forEach(cell => {
            uuids.push(cell.MenuID)
          })
        })
        MKEmitter.emit('delButtons', uuids)
      },
      onCancel() {}
    })
src/pc/components/navbar/normal-navbar/menusetting/menutable/index.scss
@@ -31,7 +31,7 @@
  tr:not(.classify) + .ant-table-expanded-row {
    display: none;
  }
  td[colspan="4"] {
  td[colspan="6"] {
    padding: 5px 0px 5px 5px!important;
  }
  .ant-table-body {
src/pc/padcontroller/index.jsx
File was deleted
src/pc/padcontroller/index.scss
File was deleted
src/tabviews/rolemanage/index.jsx
@@ -117,6 +117,11 @@
      let _openKeys = []
      // MenuID(菜单Id)、MenuName(菜单名称)、OnlySelf(值为true,表示三级菜单,增加-仅页面)、Type(菜单级别)
      // ParentID(父级Id)、Selected(是否选中-已失效)、Tabs( 标签类型)、TypeCharOne 菜单类型PC或其他
      // result.data.forEach(item => { // 测试
      //   if (item.ParentID === '0') {
      //     item.ParentID = item.TypeCharOne
      //   }
      // })
      let _tree = this.getTree(fromJS(mainMenus).toJS(), result.data)
      if (_tree[0]) {
        if (_tree[0].key === 'PC' && _tree[0].children) {
src/utils/utils-datamanage.js
@@ -202,6 +202,8 @@
    param.LText = Utils.formatOptions(LText)
    param.DateCount = Utils.formatOptions(DateCount)
    // exec_type: 'y' 解码字段:LText、LText1、LText2、custom_script、DateCount
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    param.secretkey = Utils.encrypt('', param.timestamp)
src/views/pcdesign/index.jsx
@@ -29,7 +29,6 @@
const BgController = asyncComponent(() => import('@/pc/bgcontroller'))
const Quotecomponent = asyncComponent(() => import('@/pc/quotecomponent'))
const PasteController = asyncComponent(() => import('@/menu/pastecontroller'))
const PaddingController = asyncComponent(() => import('@/pc/padcontroller'))
const StyleController = asyncComponent(() => import('@/menu/stylecontroller'))
const SysInterface = asyncComponent(() => import('@/menu/sysinterface'))
const PictureController = asyncComponent(() => import('@/menu/picturecontroller'))
@@ -311,10 +310,10 @@
  }
  delButtons = (items) => {
    const { copyButtons } = this.state
    const { copyButtons, delButtons } = this.state
    this.setState({
      delButtons: [...this.state.delButtons, ...items],
      delButtons: [...delButtons, ...items],
      copyButtons: copyButtons.filter(item => !items.includes(item.uuid))
    })
  }
@@ -756,20 +755,87 @@
              _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
              _param.secretkey = Utils.encrypt('', _param.timestamp)
              Api.getSystemConfig(_param).then(res => {
                if (!res.status) {
                  notification.warning({
                    top: 92,
                    message: res.message,
                    duration: 5
                  })
                  return
              let appMenuParam = null
              if (item.type === 'navbar') {
                appMenuParam = {
                  func: 's_appmenus_addupt',
                  exec_type: 'y'
                }
                appMenuParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
                appMenuParam.secretkey = Utils.encrypt('', _param.timestamp)
                new_open_edition[item.uuid] = res.open_edition || ''
                resolve()
              })
                let LText = []
                let app_param = []
                let kei_no = sessionStorage.getItem('kei_no')
                let userid = sessionStorage.getItem('CloudUserID') || ''
                item.menus.forEach((fst, findex) => {
                  // LText.push(`select '${fst.MenuID}','${fst.name}','','0','${sessionStorage.getItem('appId')}','0','${(findex + 1) * 10}','10','','${userid}','${window.GLOB.appkey}','${fst.MenuNo || ''}','${kei_no}','pc'`)
                  LText.push(`select '${fst.MenuID}','${fst.name}','','0','0','0','${(findex + 1) * 10}','10','','${userid}','${window.GLOB.appkey}','${fst.MenuNo || ''}','${kei_no}','pc'`)
                  app_param.push(`select '${window.GLOB.appkey}','${fst.MenuID}','${userid}','${(findex + 1) * 10}','','${fst.name}','${fst.MenuNo || ''}','0','10','${kei_no}','pc'`)
                  if (fst.property === 'classify' && fst.sublist.length > 0) {
                    fst.sublist.forEach(scd => {
                      LText.push(`select '${scd.MenuID}','${scd.name}','','0','${fst.MenuID}','0','${(findex + 1) * 10}','20','','${userid}','${window.GLOB.appkey}','${scd.MenuNo || ''}','${kei_no}','pc'`)
                      app_param.push(`select '${window.GLOB.appkey}','${scd.MenuID}','${userid}','${(findex + 1) * 10}','','${scd.name}','${scd.MenuNo || ''}','${fst.MenuID}','20','${kei_no}','pc'`)
                      if (scd.property === 'classify' && scd.sublist.length > 0) {
                        scd.sublist.forEach(thd => {
                          LText.push(`select '${thd.MenuID}','${thd.name}','','0','${scd.MenuID}','0','${(findex + 1) * 10}','20','','${userid}','${window.GLOB.appkey}','${thd.MenuNo || ''}','${kei_no}','pc'`)
                          app_param.push(`select '${window.GLOB.appkey}','${thd.MenuID}','${userid}','${(findex + 1) * 10}','','${thd.name}','${thd.MenuNo || ''}','${scd.MenuID}','20','${kei_no}','pc'`)
                        })
                      }
                    })
                  }
                })
                appMenuParam.LText = Utils.formatOptions(LText.join(' union '))
                appMenuParam.LText1 = Utils.formatOptions(app_param.join(' union '))
              }
              if (appMenuParam) {
                Api.getSystemConfig(appMenuParam).then(_res => {
                  if (!_res.status) {
                    notification.warning({
                      top: 92,
                      message: _res.message,
                      duration: 5
                    })
                    this.setState({ menuloading: false })
                    return
                  }
                  Api.getSystemConfig(_param).then(res => {
                    if (!res.status) {
                      notification.warning({
                        top: 92,
                        message: res.message,
                        duration: 5
                      })
                      this.setState({ menuloading: false })
                      return
                    }
                    new_open_edition[item.uuid] = res.open_edition || ''
                    resolve()
                  })
                })
              } else {
                Api.getSystemConfig(_param).then(res => {
                  if (!res.status) {
                    notification.warning({
                      top: 92,
                      message: res.message,
                      duration: 5
                    })
                    this.setState({ menuloading: false })
                    return
                  }
                  new_open_edition[item.uuid] = res.open_edition || ''
                  resolve()
                })
              }
            })
          })
          Promise.all(deffers).then(() => {
@@ -777,6 +843,7 @@
            appViewList = JSON.parse(appViewList)
            let _length = appViewList.length
            let appIndeList = appViewList.map(item => item.keys_id).join(',')
            config.components = config.components.map(item => {
              if (item.type === 'navbar') {
@@ -819,6 +886,7 @@
                    message: result.message,
                    duration: 5
                  })
                  this.setState({ menuloading: false })
                } else {
                  sessionStorage.setItem('appViewList', JSON.stringify(appViewList))
                  resolve(true)
@@ -829,7 +897,7 @@
            }
          })
        }
      }).then(res => { // 按钮删除
      }).then(res => { // 按钮或菜单删除
        if (!res) return
        if (delButtons.length === 0) {
@@ -1173,11 +1241,8 @@
                  {customComponents && customComponents.length ? <Panel header="自定义组件" key="cuscomponent">
                    <SourceWrap components={customComponents} />
                  </Panel> : null}
                  <Panel header={'页面背景'} key="background">
                  <Panel header={'页面样式'} key="background">
                    {config ? <BgController config={config} updateConfig={this.updateConfig} /> : null}
                  </Panel>
                  <Panel header={'页面内边距'} key="padding">
                    {config ? <PaddingController config={config} updateConfig={this.updateConfig} /> : null}
                  </Panel>
                </Collapse>
              </div>
src/views/pcdesign/index.scss
@@ -169,6 +169,7 @@
    overflow-y: auto;
    .menu-shell-inner {
      min-height: 100vh;
      margin: 0 auto;
    }
  }
  .menu-body.saving {