king
2022-10-28 0a9e69c47dd88f7f2b551ab5b0507d46cb5dc252
2022-10-28
6个文件已修改
105 ■■■■ 已修改文件
src/menu/components/card/cardcellcomponent/dragaction/card.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/elementform/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/formconfig.jsx 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/picturecontroller/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/picturecontroller/index.scss 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardcellList/index.jsx 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/dragaction/card.jsx
@@ -89,7 +89,7 @@
        <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight || 'auto'}}>{val}</div>
      )
    } else if (card.eleType === 'icon') {
      return (<MkIcon style={{height: card.innerHeight || 'auto'}} className="ant-mk-icon" type={card.icon}/>)
      return (<MkIcon style={{height: card.innerHeight || 'auto'}} className="ant-mk-icon" type={card.icon || 'bell'}/>)
    } else if (card.eleType === 'slider') {
      let val = card.value ? (card.value / card.maxValue) * 100 : 30
      return <MkProgress value={val} config={card}/>
src/menu/components/card/cardcellcomponent/elementform/index.jsx
@@ -19,7 +19,7 @@
  number: ['eleType', 'datatype', 'width', 'height', 'prefix', 'postfix', 'noValue', 'fixStyle'],
  picture: ['eleType', 'datatype', 'width', 'lenWidRadio', 'maxWidth', 'link', 'noValue'],
  video: ['eleType', 'datatype', 'width', 'aspectRatio', 'autoPlay', 'loop', 'startTime', 'noValue', 'posterType'],
  icon: ['eleType', 'icon', 'datatype', 'width'],
  icon: ['eleType', 'datatype', 'width', 'tooltip'],
  slider: ['eleType', 'datatype', 'width', 'color', 'maxValue', 'showInfo', 'showType', 'strokeWidth', 'strokeLinecap', 'trailColor'],
  splitline: ['eleType', 'color', 'width', 'borderWidth'],
  barcode: ['eleType', 'datatype', 'width', 'barHeight', 'displayValue', 'interval', 'noValue'],
@@ -144,7 +144,7 @@
      if (datatype === 'dynamic') {
        _options.push('field')
      } else {
        _options.push('tooltip')
        _options.push('icon')
      }
    }
    if (_options.includes('fixStyle') && fixStyle === 'alone') {
src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -32,22 +32,10 @@
  } else if (card.eleType === 'sequence') { // 拖拽添加类型转换
    card.eleType = 'text'
  }
  let appMenus = []
  const isApp = sessionStorage.getItem('appType') === 'pc'
  if (isApp) {
    appMenus = sessionStorage.getItem('appMenus')
    if (appMenus) {
      try {
        appMenus = JSON.parse(appMenus)
      } catch (e) {
        appMenus = []
  if (card.eleType === 'icon' && card.datatype === 'dynamic' && !card.field) { // 拖拽添加类型转换
    card.datatype = 'static'
      }
    } else {
      appMenus = []
    }
  }
  let appType = sessionStorage.getItem('appType')
  let tooltip = ''
  if (cardCell.$cardType === 'extendCard') {
@@ -62,13 +50,6 @@
      initVal: card.eleType,
      required: true,
      options: _options
    },
    {
      type: 'icon',
      key: 'icon',
      label: '图标',
      initVal: card.icon,
      required: true
    },
    {
      type: 'radio',
@@ -89,6 +70,13 @@
      initVal: card.field || '',
      required: true,
      options: []
    },
    {
      type: 'icon',
      key: 'icon',
      label: '图标',
      initVal: card.icon,
      required: true
    },
    {
      type: 'text',
@@ -234,7 +222,8 @@
      key: 'tooltip',
      label: '提示信息',
      initVal: card.tooltip || '',
      tooltip: '鼠标悬浮时显示。',
      tooltip: '鼠标悬浮时显示。注:如使用动态信息,请在此处填写相应的字段名。',
      forbid: appType === 'mob',
      required: false
    },
    {
@@ -508,27 +497,6 @@
        { value: 'true', text: '可以' }
      ]
    },
    {
      type: 'select',
      key: 'linkmenu',
      label: '关联菜单',
      initVal: card.linkmenu || '',
      required: true,
      forbid: !isApp,
      options: appMenus
    },
    // {
    //   type: 'radio',
    //   key: 'open',
    //   label: '打开方式',
    //   initVal: card.open || 'blank',
    //   required: false,
    //   forbid: !isApp,
    //   options: [
    //     { value: 'blank', text: '新页面' },
    //     { value: 'self', text: '当前页面' }
    //   ]
    // },
    {
      type: 'select',
      key: 'linkurl',
src/menu/picturecontroller/index.jsx
@@ -1,15 +1,18 @@
import React, {Component} from 'react'
import { Modal, Button, Row, Col, Input, message, Tabs, Empty, Pagination, notification } from 'antd'
import { Modal, Button, Row, Col, Input, message, Tabs, Empty, Pagination, notification, Typography } from 'antd'
import { PlusOutlined, CopyOutlined, EditOutlined, DeleteOutlined, PictureOutlined } from '@ant-design/icons'
import Api from '@/api'
import Utils from '@/utils/utils.js'
import asyncComponent from '@/utils/asyncComponent'
import { minkeIconSystem } from '@/utils/option.js'
import MkIcon from '@/components/mk-icon'
import './index.scss'
const { Search } = Input
const { confirm } = Modal
const { TabPane } = Tabs
const { Paragraph } = Typography
const EditForm = asyncComponent(() => import('./editform'))
const Video = asyncComponent(() => import('./video'))
@@ -30,6 +33,7 @@
    colorlist: [],
    piclist: [],
    vidlist: [],
    iconlist: [...minkeIconSystem.direction, ...minkeIconSystem.edit, ...minkeIconSystem.normal, ...minkeIconSystem.data, ...minkeIconSystem.hint],
    picIndex: 1,
    vidIndex: 1,
  }
@@ -241,7 +245,7 @@
  }
  
  render() {
    const { visible, editvisible, card, filpictures, filvideos, piclist, vidlist, imageKey, videoKey, pageSize, picIndex, vidIndex, colorlist } = this.state
    const { visible, editvisible, card, filpictures, filvideos, piclist, vidlist, imageKey, videoKey, pageSize, picIndex, vidIndex, colorlist, iconlist } = this.state
    return (
      <div style={{display: 'inline-block'}}>
@@ -348,6 +352,16 @@
                {!colorlist.length ? <Empty description={null}/> : null}
              </Row>
            </TabPane>
            <TabPane tab="图标库" key="icon">
              <Row gutter={16}>
                {iconlist.map(item => (
                  <Col className="icon-wrap" span={4} key={item}>
                    <MkIcon type={item} />
                    <Paragraph copyable={{ text: item }}>{item}</Paragraph>
                  </Col>
                ))}
              </Row>
            </TabPane>
          </Tabs>
        </Modal>
        <Modal
src/menu/picturecontroller/index.scss
@@ -70,6 +70,14 @@
  .ant-pagination {
    text-align: right;
  }
  .icon-wrap {
    text-align: center;
    margin-bottom: 24px;
    >.anticon {
      font-size: 34px;
      margin-bottom: 5px;
    }
  }
}
.picture-edit-model {
  .ant-modal {
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -454,7 +454,14 @@
        )
      } else if (card.eleType === 'icon') {
        let val = ''
        let icon = ''
        let height = card.innerHeight
        if (card.datatype === 'dynamic') {
          icon = data[card.field] || ''
        } else {
          icon = card.icon
        }
        if (!height) { // 兼容
          let fontSize = 14
@@ -470,18 +477,18 @@
          height = fontSize * lineHeight
        }
  
        if (card.datatype === 'static') {
        if (data.hasOwnProperty(card.tooltip)) {
          val = data[card.tooltip]
        } else {
          val = card.tooltip
        } else if (data.hasOwnProperty(card.field)) {
          val = data[card.field]
        }
  
        contents.push(
          <Col key={card.uuid} span={card.width}>
            <div style={card.style}>
              {val ? <Tooltip title={val}>
                <MkIcon className="ant-mk-icon" style={{height: height}} type={card.icon}/>
              </Tooltip> : <MkIcon className="ant-mk-icon" style={{height: height}} type={card.icon}/>}
                <MkIcon className="ant-mk-icon" style={{height: height}} type={icon}/>
              </Tooltip> : <MkIcon className="ant-mk-icon" style={{height: height}} type={icon}/>}
            </div>
          </Col>
        )