king
2023-09-05 c9967063fa42e15d9f695220c76641cfa28669f2
2023-09-05
17个文件已修改
2个文件已添加
2个文件已删除
1110 ■■■■ 已修改文件
src/api/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tabview/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/basetable/index.jsx 90 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/basetable/index.scss 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.scss 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-X6/index.jsx 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/voucher/voucherTable/index.jsx 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 97 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.scss 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/popview/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/automatic/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/automatic/index.scss 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/flowFloat/index.jsx 225 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/flowFloat/index.scss 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/pageMessage/index.jsx 351 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/pageMessage/index.scss 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/settingcomponent/index.jsx 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/settingcomponent/index.scss 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/tablenodes/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/tablenodes/index.scss 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js
@@ -876,7 +876,7 @@
      let time = +sessionStorage.getItem(rduri)
      let c_time = Math.round(new Date().getTime() / 1000)
      if (time && c_time - time <= 60) {
      if (time && c_time - time <= 1800) {
        sessionStorage.setItem(rduri, c_time)
        return axios({
          url: `${url}${param.func ? '/' + param.func : ''}`,
src/components/tabview/index.scss
@@ -67,7 +67,7 @@
      >.ant-tabs-content {
        height: 100%;
        .ant-tabs-tabpane:first-child {
          .page-setting-wrap, .page-message-wrap {
          .user-tools {
            display: none;
          }
        }
src/tabviews/basetable/index.jsx
@@ -13,6 +13,7 @@
// 通用组件
const AntvTabs = asyncComponent(() => import('@/tabviews/custom/components/tabs/antv-tabs'))
const MkBaseTable = asyncComponent(() => import('@/tabviews/custom/components/table/base-table'))
const FlowFloat = asyncComponent(() => import('@/tabviews/zshare/flowFloat'))
const SettingComponent = asyncComponent(() => import('@/tabviews/zshare/settingcomponent'))
const TableNodes = asyncComponent(() => import('@/tabviews/zshare/tablenodes'))
const AutoMatic = asyncComponent(() => import('@/tabviews/zshare/automatic'))
@@ -35,7 +36,6 @@
    lostmsg: '',          // 页面丢失时的提示信息
    config: null,         // 页面配置信息,包括组件等
    userConfig: null,     // 用户自定义设置
    loading: false,       // 列表数据加载中
    visible: false,       // 标签页控制
    shortcuts: null,      // 快捷键
    autoMatic: null
@@ -102,6 +102,48 @@
        return
      }
      if (config.process === 'true') {
        let unset = true
        if (result.works_flow_code && result.works_long_param) {
          try { // 流程信息解析
            let flowConfig = JSON.parse(window.decodeURIComponent(window.atob(result.works_long_param)))
            flowConfig.flow_code = result.works_flow_code
            flowConfig.flow_name = result.works_flow_name
            config.flow_code = result.works_flow_code
            config.flow_name = result.works_flow_name
            unset = false
            window.GLOB.UserCacheMap.set('flow' + MenuID, flowConfig)
          } catch (e) {
            unset = true
            console.warn('Parse Failure')
          }
        }
        if (unset) {
          this.setState({
            config: config,
            viewlost: true,
            loadingview: false,
            lostmsg: '抱歉,您访问的页面未设置工作流,请联系管理员。'
          })
          return
        }
      } else if (result.works_flow_code) {
        Api.getSystemConfig({
          func: 's_works_flow_param_sso_menu_upt_v6',
          upt_type: 'del',
          works_flow_code: '',
          works_flow_name: '',
          long_param: '',
          flow_id: '',
          menuid: config.MenuID,
          menuname: config.MenuName,
          username: sessionStorage.getItem('User_Name') || '',
          fullName: sessionStorage.getItem('Full_Name') || ''
        })
      }
      // HS不使用自定义设置
      if (result.LongParamUser && !window.GLOB.mkHS) {
        try { // 配置信息解析
@@ -148,7 +190,7 @@
        })
      }
      config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, skip, param, MenuID, config.MenuName)
      config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, skip, param, MenuID, config.MenuName, config.process === 'true')
      let autoMatic = null
      if (config.autoMatic && config.autoMatic.enable === 'true') {
@@ -263,10 +305,15 @@
    }
  }
  filterComponent = (components, roleId, permAction, skip, urlparam, pageId, MenuName) => {
  filterComponent = (components, roleId, permAction, skip, urlparam, pageId, MenuName, process) => {
    return components.filter(item => {
      item.$pageId = pageId
      item.$searchId = pageId
      if (process) {
        item.$process = process
        item.$flowId = 'flow' + this.props.MenuID
      }
      item.$menuname = (MenuName || '') + '-' + (item.name || '主表')
@@ -287,7 +334,7 @@
          if (tab.permission !== 'true') { // 权限未开启不做权限控制
            skip = true
          }
          tab.components = this.filterComponent(tab.components, roleId, permAction, skip, urlparam, pageId, MenuName)
          tab.components = this.filterComponent(tab.components, roleId, permAction, skip, urlparam, pageId, MenuName, process)
          return tab
        })
@@ -410,6 +457,11 @@
    cell.$menuId = item.uuid
    cell.$MenuID = this.props.MenuID
    cell.$view = 'popview'
    if (item.$process) {
      cell.$process = true
      cell.$flowId = 'flow' + this.props.MenuID
    }
    if (cell.controlField) {
      if (/,/ig.test(cell.controlVal)) {
@@ -640,7 +692,6 @@
      loadingview: true,    // 页面加载中
      viewlost: false,      // 页面丢失:1、未获取到配置-页面丢失;2、页面未启用
      config: null,         // 页面配置信息,包括组件等
      loading: false,       // 列表数据加载中
      shortcuts: null,
    }, () => {
      this.loadconfig()
@@ -670,17 +721,30 @@
  }
  render() {
    const { loadingview, viewlost, config, loading, shortcuts, autoMatic } = this.state
    const { loadingview, viewlost, config, shortcuts, autoMatic } = this.state
    if (!config || viewlost) {
      return (
        <div className="custom-table-wrap">
          {loadingview ? <Spin className="view-spin" size="large" /> : null}
          {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
          <div className="user-tools">
            {config && config.process === 'true' ? <FlowFloat init={true} config={config}/> : null}
          </div>
        </div>
      )
    }
    return (
      <div className={'custom-table-wrap ' + (loadingview || loading ? 'loading' : '')} id={this.state.ContainerId} style={config ? config.style : null}>
        {(loadingview || loading) ? <Spin className="view-spin" size="large" /> : null}
      <div className="custom-table-wrap" id={this.state.ContainerId} style={config.style}>
        <Row className="component-wrap">{this.getComponents()}</Row>
        {config && window.GLOB.breakpoint ? <DebugTable /> : null}
        {!window.GLOB.mkHS && config && autoMatic ? <AutoMatic autoMatic={autoMatic} tabId={config.MenuID} config={config.components[0]} /> : null}
        {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <TableNodes config={config} /> : null}
        {!window.GLOB.mkHS && config ? <SettingComponent config={config} shortcuts={shortcuts || []}/> : null}
        {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
        {window.GLOB.breakpoint ? <DebugTable /> : null}
        <div className="user-tools">
          {autoMatic ? <AutoMatic autoMatic={autoMatic} tabId={config.MenuID} config={config.components[0]} /> : null}
          {config.process === 'true' ? <FlowFloat config={config}/> : null}
          <SettingComponent config={config} shortcuts={shortcuts || []}/>
          <TableNodes config={config} />
        </div>
      </div>
    )
  }
src/tabviews/basetable/index.scss
@@ -43,9 +43,21 @@
  .ant-btn-link:hover {
    opacity: 0.8;
  }
}
.custom-table-wrap.loading {
  .ant-spin-spinning:not(.view-spin) {
    display: none;
  .user-tools {
    position: fixed;
    z-index: 2;
    bottom: 55px;
    right: 20px;
    .tool-wrap {
      margin-top: 5px;
      .ant-btn {
        width: 40px;
        height: 40px;
      }
      .anticon-forward {
        font-size: 20px;
      }
    }
  }
}
src/tabviews/commontable/index.jsx
@@ -1134,7 +1134,7 @@
          </Tabs>))
        }
        {setting && window.GLOB.breakpoint ? <DebugTable /> : null}
        {!window.GLOB.mkHS && setting ? <SettingComponent config={config} shortcuts={shortcuts || []}/> : null}
        {setting ? <SettingComponent config={config} shortcuts={shortcuts || []}/> : null}
        {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
      </div>
    )
src/tabviews/commontable/index.scss
@@ -137,4 +137,15 @@
      clear: both;
    }
  }
  .tool-wrap {
    position: fixed;
    z-index: 2;
    bottom: 55px;
    right: 20px;
    .ant-btn {
      width: 40px;
      height: 40px;
    }
  }
}
src/tabviews/custom/components/chart/antv-X6/index.jsx
@@ -387,6 +387,7 @@
    loading: false,
    status: 0,
    flowname: '',
    flowcode: '',
    orgs: []
  }
@@ -621,7 +622,8 @@
      this.setState({
        status: item.status || 0,
        flowname: item.works_flow_name,
        flowname: item.works_flow_name || '',
        flowcode: item.works_flow_code || '',
        loading: false
      })
@@ -1535,7 +1537,7 @@
  }
  save = () => {
    const { BID, plot, status } = this.state
    const { BID, plot, status, flowname, flowcode } = this.state
    if (!BID) {
      Modal.error({
@@ -1569,18 +1571,52 @@
        ID: BID,
        BID: ''
      }
      let ssoParam = {
        func: 's_works_flow_param_sso_upt_v6',
        status: status,
        ID: BID,
        works_flow_code: flowcode,
        works_flow_name: flowname,
        long_param: window.btoa(window.encodeURIComponent(JSON.stringify(nodes)))
      }
  
      Api.genericInterface(param).then(res => {
        if (res.status) {
          notification.success({
            top: 92,
            message: '保存成功!',
            duration: 2
          })
          this.setState({
            loading: false,
            status: _status
          })
          if (plot.subtype === 'xflow') {
            Api.getSystemConfig(ssoParam).then(result => {
              if (result.status) {
                notification.success({
                  top: 92,
                  message: '保存成功!',
                  duration: 2
                })
                this.setState({
                  loading: false,
                  status: _status
                })
              } else {
                notification.error({
                  top: 92,
                  message: result.message,
                  duration: 10
                })
                this.setState({
                  loading: false
                })
              }
            })
          } else {
            notification.success({
              top: 92,
              message: '保存成功!',
              duration: 2
            })
            this.setState({
              loading: false,
              status: _status
            })
          }
        } else {
          notification.error({
            top: 92,
src/tabviews/custom/components/module/voucher/voucherTable/index.jsx
@@ -1136,10 +1136,23 @@
      }
    })
    let _total = debit
    if (debit === 0) {
      debit = ''
    }
    if (_total === '' && credit !== '') {
      _total = 0
    }
    if (credit === 0) {
      credit = ''
    }
    totalLine.debit = debit
    totalLine.credit = credit
    totalLine.subject_voucher_text = this.changeMoneyToChinese(debit)
    totalLine.subject_voucher_text = this.changeMoneyToChinese(_total)
    
    return totalLine
  }
src/tabviews/custom/index.jsx
@@ -44,6 +44,7 @@
const Iframe = asyncComponent(() => import('./components/iframe'))
const Calendar = asyncComponent(() => import('./components/calendar'))
const DebugTable = asyncComponent(() => import('@/tabviews/debugtable'))
const FlowFloat = asyncComponent(() => import('@/tabviews/zshare/flowFloat'))
const TableNodes = asyncComponent(() => import('@/tabviews/zshare/tablenodes'))
const MkInterfaces = asyncComponent(() => import('@/tabviews/custom/components/interfaces'))
@@ -132,6 +133,49 @@
        return
      }
      if (config.process === 'true') {
        let unset = true
        if (result.works_flow_code && result.works_long_param) {
          try { // 流程信息解析
            let flowConfig = JSON.parse(window.decodeURIComponent(window.atob(result.works_long_param)))
            flowConfig.flow_code = result.works_flow_code
            flowConfig.flow_name = result.works_flow_name
            config.flow_code = result.works_flow_code
            config.flow_name = result.works_flow_name
            unset = false
            window.GLOB.UserCacheMap.set('flow' + MenuID, flowConfig)
          } catch (e) {
            unset = true
            console.warn('Parse Failure')
          }
        }
        if (unset) {
          config.interfaces = []
          this.setState({
            config: config,
            viewlost: true,
            loadingview: false,
            lostmsg: '抱歉,您访问的页面未设置工作流,请联系管理员。'
          })
          return
        }
      } else if (result.works_flow_code) {
        Api.getSystemConfig({
          func: 's_works_flow_param_sso_menu_upt_v6',
          upt_type: 'del',
          works_flow_code: '',
          works_flow_name: '',
          long_param: '',
          flow_id: '',
          menuid: config.MenuID,
          menuname: config.MenuName,
          username: sessionStorage.getItem('User_Name') || '',
          fullName: sessionStorage.getItem('Full_Name') || ''
        })
      }
      // HS不使用自定义设置
      if (result.LongParamUser && !window.GLOB.mkHS) {
        try { // 配置信息解析
@@ -193,7 +237,7 @@
      let initInters = []
      config.interfaces = this.formatInterSetting(config.interfaces, regs, MenuID, initInters)
      config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, balMap, skip, param, MenuID, config.interfaces, config.$cache, config.$time, config.MenuName, MenuID, MenuID)
      config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, balMap, skip, param, MenuID, config.interfaces, config.$cache, config.$time, config.MenuName, MenuID, MenuID, config.process === 'true')
      let params = []
      let BID = param.$BID || ''
@@ -324,12 +368,17 @@
    }
  }
  filterComponent = (components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, cache, time, MenuName, searchId, syncId) => {
  filterComponent = (components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, cache, time, MenuName, searchId, syncId, process) => {
    return components.filter(item => {
      item.$pageId = pageId
      item.$searchId = searchId
      item.$syncId = syncId
      
      if (process) {
        item.$process = process
        item.$flowId = 'flow' + this.props.MenuID
      }
      if (cache) {
        item.$cache = cache
        item.$time = time
@@ -444,7 +493,7 @@
            _searchId = tab.uuid
          }
          tab.components = this.filterComponent(tab.components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, cache, time, MenuName, _searchId, tab.uuid)
          tab.components = this.filterComponent(tab.components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, cache, time, MenuName, _searchId, tab.uuid, process)
          
          if (_searchId === tab.uuid) {
            tab.components.forEach(cell => {
@@ -468,7 +517,7 @@
          return false
        }
        item.components = this.filterComponent(item.components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, cache, time, MenuName, searchId, syncId)
        item.components = this.filterComponent(item.components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, cache, time, MenuName, searchId, syncId, process)
        return true
      } else if (['pie', 'bar', 'line', 'dashboard', 'scatter', 'chart', 'antvG6', 'antvX6'].includes(item.type)) {
@@ -720,6 +769,11 @@
            group.subButton.Ot = item.wrap.datatype === 'static' ? 'notRequired' : 'requiredSgl'
          }
          if (item.$process) {
            group.subButton.$process = true
            group.subButton.$flowId = 'flow' + this.props.MenuID
          }
          if (item.$cache && item.$time) {
            group.$cache = item.$cache
            group.$time = item.$time
@@ -812,6 +866,11 @@
    cell.$menuId = item.uuid
    cell.$MenuID = this.props.MenuID
    cell.$view = 'popview'
    if (item.$process) {
      cell.$process = true
      cell.$flowId = 'flow' + this.props.MenuID
    }
    if (cell.btnstyle) { // 兼容
      cell.style = cell.style || {}
@@ -1572,15 +1631,29 @@
  render() {
    const { loadingview, viewlost, config, loading, shortcuts, BID } = this.state
    if (!config || viewlost) {
      return (
        <div className="custom-page-wrap">
          {loadingview ? <Spin className="view-spin" size="large" /> : null}
          {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
          <div className="user-tools">
            {config && config.process === 'true' ? <FlowFloat init={true} config={config}/> : null}
          </div>
        </div>
      )
    }
    return (
      <div className={`custom-page-wrap ${config && config.minWidth ? 'mk-scroll' : ''} ${loadingview || loading ? 'loading' : ''} ${config && config.mask === 'false' ? 'mk-no-mask' : ''}`} id={this.state.ContainerId} style={config ? config.style : null}>
        {(loadingview || (loading && !config.$cache)) ? <Spin className="view-spin" size="large" /> : null}
        <Row id={config ? 'menu' + config.uuid : ''} style={config && config.minWidth ? {minWidth: config.minWidth} : null} className="component-wrap">{this.getComponents()}</Row>
        {config && config.interfaces.length > 0 ? <MkInterfaces BID={BID} interfaces={config.interfaces}/> : null}
        {config && window.GLOB.breakpoint ? <DebugTable /> : null}
        {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <TableNodes config={config} /> : null}
        {!window.GLOB.mkHS && config ? <SettingComponent config={config} shortcuts={shortcuts || []}/> : null}
        {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
      <div className={`custom-page-wrap ${config.minWidth ? 'mk-scroll' : ''} ${loading ? 'loading' : ''} ${config.mask === 'false' ? 'mk-no-mask' : ''}`} id={this.state.ContainerId} style={config.style}>
        {loading && !config.$cache ? <Spin className="view-spin" size="large" /> : null}
        <Row id={'menu' + config.uuid} style={{minWidth: config.minWidth || 'unset'}} className="component-wrap">{this.getComponents()}</Row>
        {config.interfaces.length > 0 ? <MkInterfaces BID={BID} interfaces={config.interfaces}/> : null}
        {window.GLOB.breakpoint ? <DebugTable /> : null}
        <div className="user-tools">
          {config.process === 'true' ? <FlowFloat config={config}/> : null}
          <SettingComponent config={config} shortcuts={shortcuts || []}/>
          <TableNodes config={config} />
        </div>
      </div>
    )
  }
src/tabviews/custom/index.scss
@@ -43,6 +43,23 @@
  .ant-btn-link:hover {
    opacity: 0.8;
  }
  .user-tools {
    position: fixed;
    z-index: 2;
    bottom: 55px;
    right: 20px;
    .tool-wrap {
      margin-top: 5px;
      .ant-btn {
        width: 40px;
        height: 40px;
      }
      .anticon-forward {
        font-size: 20px;
      }
    }
  }
}
.custom-page-wrap.loading {
  .ant-spin-spinning:not(.view-spin) {
src/tabviews/custom/popview/index.jsx
@@ -172,6 +172,11 @@
      item.$pageId = Tab.uuid
      item.$searchId = searchId
      item.$syncId = syncId
      if (Tab.$process) {
        item.$process = true
        item.$flowId = Tab.$flowId
      }
      
      if (item.style && item.style.boxShadow) {
        delete item.style.hShadow
@@ -586,6 +591,11 @@
    cell.$MenuID = Tab.$MenuID
    cell.$tabId = Tab.uuid
    if (Tab.$process) {
      cell.$process = true
      cell.$flowId = Tab.$flowId
    }
    if (cell.btnstyle) { // 兼容
      cell.style = cell.style || {}
      cell.style = {...cell.style, ...cell.btnstyle}
src/tabviews/zshare/automatic/index.jsx
@@ -4,7 +4,7 @@
import { Button, message } from 'antd'
import MKEmitter from '@/utils/events.js'
import './index.scss'
// import './index.scss'
class AutoMatic extends Component {
  static propTpyes = {
@@ -223,12 +223,9 @@
    const { running } = this.state
    return (
      <Button
        icon={running ? 'pause' : 'forward'}
        shape="circle"
        className={'auto-matic ' + (window.GLOB.systemType === 'production' ? 'low' : '')}
        onClick={this.trigger}
      />
      <div className="tool-wrap">
        <Button icon={running ? 'pause' : 'forward'} shape="circle" onClick={this.trigger}/>
      </div>
    )
  }
}
src/tabviews/zshare/automatic/index.scss
@@ -1,14 +0,0 @@
.auto-matic {
  position: fixed;
  z-index: 2;
  bottom: 145px;
  right: 20px;
  width: 40px;
  height: 40px;
  .anticon-forward {
    font-size: 20px;
  }
}
.auto-matic.low {
  bottom: 100px;
}
src/tabviews/zshare/flowFloat/index.jsx
New file
@@ -0,0 +1,225 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Button, Modal, notification, Spin, Empty } from 'antd'
import { BranchesOutlined } from '@ant-design/icons'
import Api from '@/api'
import MKEmitter from '@/utils/events.js'
import './index.scss'
class CustomSetting extends Component {
  static propTpyes = {
    config: PropTypes.object,
    init: PropTypes.any
  }
  state = {
    debug: sessionStorage.getItem('debug') === 'true',
    visible: false,
    flows: null,
    loading: false,
    activeCode: '',
    initCode: ''
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState))
  }
  componentDidMount() {
    const { init } = this.props
    if (init) {
      this.trigger()
    }
  }
  trigger = () => {
    const { config } = this.props
    const { debug } = this.state
    if (!debug) return null
    this.setState({
      visible: true,
      loading: false,
      initCode: config.flow_code || '',
      activeCode: ''
    })
    let param = {
      func: 's_get_works_flow_local_param_v6'
    }
    Api.genericInterface(param).then(result => {
      if (result.status) {
        let flows = result.data || []
        let active = config.flow_code ? flows.filter(item => item.works_flow_code === config.flow_code)[0] : null
        this.setState({
          flows: flows,
          activeCode: active
        })
        if (config.flow_code && !active) {
          Modal.error({
            title: '当前菜单工作流已失效,请重新选择。'
          })
        }
      } else {
        if (!result.message) return
        if (result.ErrCode === 'N') {
          Modal.error({
            title: result.message,
          })
        } else if (result.ErrCode !== '-2') {
          notification.error({
            top: 92,
            message: result.message,
            duration: 10
          })
        }
      }
    })
  }
  settingSubmit = () => {
    const { config } = this.props
    const { activeCode } = this.state
    let param = {
      func: 's_works_flow_param_sso_menu_upt_v6',
      upt_type: '',
      works_flow_code: activeCode.works_flow_code,
      works_flow_name: activeCode.works_flow_name,
      long_param: activeCode.long_param,
      flow_id: activeCode.id,
      menuid: config.MenuID,
      menuname: config.MenuName,
      username: sessionStorage.getItem('User_Name') || '',
      fullName: sessionStorage.getItem('Full_Name') || ''
    }
    this.setState({
      loading: true
    })
    Api.getSystemConfig(param).then(result => {
      if (!result.status) {
        this.setState({
          loading: false
        })
        notification.warning({
          top: 92,
          message: result.message,
          duration: 5
        })
        return
      }
      Api.deleteMenuStorage(config.MenuID)
      setTimeout(() => {
        this.setState({
          visible: false,
          loading: false
        }, () => {
          window.GLOB.CacheMap = new Map()
          MKEmitter.emit('reloadMenuView', config.MenuID)
        })
      }, 100)
    })
  }
  deleteFlow = () => {
    const { config } = this.props
    let param = {
      func: 's_works_flow_param_sso_menu_upt_v6',
      upt_type: 'del',
      works_flow_code: '',
      works_flow_name: '',
      long_param: '',
      flow_id: '',
      menuid: config.MenuID,
      menuname: config.MenuName,
      username: sessionStorage.getItem('User_Name') || '',
      fullName: sessionStorage.getItem('Full_Name') || ''
    }
    this.setState({
      deling: true
    })
    Api.getSystemConfig(param).then(result => {
      if (!result.status) {
        this.setState({
          deling: false
        })
        notification.warning({
          top: 92,
          message: result.message,
          duration: 5
        })
        return
      }
      Api.deleteMenuStorage(config.MenuID)
      setTimeout(() => {
        this.setState({
          visible: false,
          deling: false
        }, () => {
          window.GLOB.CacheMap = new Map()
          MKEmitter.emit('reloadMenuView', config.MenuID)
        })
      }, 100)
    })
  }
  changeFlow = (item) => {
    this.setState({
      activeCode: item
    })
  }
  render() {
    const { flows, visible, initCode, loading, deling, activeCode, debug } = this.state
    if (!debug) return null
    return (
      <div className="tool-wrap">
        <Button shape="circle" onClick={this.trigger}><BranchesOutlined /></Button>
        <Modal
          wrapClassName="flow-setting-modal"
          title="工作流"
          maskClosable={false}
          width={1000}
          visible={visible}
          onCancel={() => { this.setState({ visible: false }) }}
          footer={[
            initCode ? <Button key="revert" type="danger" disabled={loading} loading={deling} onClick={this.deleteFlow}>删除</Button> : null,
            <Button key="cancel" onClick={() => { this.setState({ visible: false }) }}>取消</Button>,
            <Button key="confirm" type="primary" disabled={deling || !activeCode} loading={loading} onClick={this.settingSubmit}>提交</Button>
          ]}
          destroyOnClose
        >
          {!flows ? <Spin size="large" /> : <>
            {flows.length === 0 ? <Empty /> : <div>
              {flows.map(item => (<div className={'flow-item' + (activeCode && activeCode.works_flow_code === item.works_flow_code ? ' active' : '')} key={item.works_flow_code} onClick={() => this.changeFlow(item)}>
                <div className="header">{item.works_flow_name}({item.works_flow_code})</div>
                <div className="img" style={{backgroundImage: `url(${item.flow_image})`}}></div>
              </div>))}
            </div>}
          </>}
          {flows && flows.length === 0 ? <Empty /> : null}
          {!flows ? <Spin size="large" /> : null}
        </Modal>
      </div>
    )
  }
}
export default CustomSetting
src/tabviews/zshare/flowFloat/index.scss
New file
@@ -0,0 +1,80 @@
.flow-setting-modal {
  .ant-modal {
    top: 50px;
    padding-bottom: 5px;
    .ant-modal-footer {
      .ant-btn-danger:hover {
        color: #ffffff!important;
      }
    }
    .ant-modal-body {
      max-height: calc(100vh - 190px);
      min-height: 250px;
      overflow-y: auto;
      padding-top: 0px;
      position: relative;
      .flow-item {
        display: inline-block;
        width: calc(25% - 20px);
        margin: 10px;
        border: 1px solid #d8d8d8;
        vertical-align: top;
        cursor: pointer;
        .header {
          height: 50px;
          padding: 5px;
          word-break: break-word;
          display: -webkit-box;
          -webkit-box-orient: vertical;
          overflow: hidden;
          -webkit-line-clamp: 2;
          text-align: center;
        }
        .img {
          height: 150px;
          background-size: contain;
          background-position: center;
          background-repeat: no-repeat;
        }
      }
      .flow-item.active {
        border: 1px solid var(--mk-sys-color);
        box-shadow: 0 0 2px var(--mk-sys-color);
      }
      .ant-spin {
        position: absolute;
        left: calc(50% - 22px);
        top: 100px;
      }
      .ant-empty {
        margin-top: 30px;
      }
      .component-title {
        font-size: 16px;
        display: inline-block;
        margin: 20px 0px 10px 0px;
        padding: 0 10px;
        border-bottom: 2px solid #1890ff;
      }
    }
    .ant-modal-body::-webkit-scrollbar {
      width: 7px;
    }
    .ant-modal-body::-webkit-scrollbar-thumb {
      border-radius: 5px;
      box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13);
      background: rgba(0, 0, 0, 0.13);
    }
    .ant-modal-body::-webkit-scrollbar-track {
      box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
      border-radius: 3px;
      border: 1px solid rgba(0, 0, 0, 0.07);
      background: rgba(0, 0, 0, 0);
    }
  }
}
src/tabviews/zshare/pageMessage/index.jsx
File was deleted
src/tabviews/zshare/pageMessage/index.scss
File was deleted
src/tabviews/zshare/settingcomponent/index.jsx
@@ -410,7 +410,9 @@
        return
      }
      Api.deleteMenuStorage(config.MenuID).then(() => {
      Api.deleteMenuStorage(config.MenuID)
      setTimeout(() => {
        this.setState({
          visible: false,
          revertLoading: false
@@ -418,7 +420,7 @@
          window.GLOB.CacheMap = new Map()
          MKEmitter.emit('reloadMenuView', config.MenuID)
        })
      })
      }, 100)
    })
  }
@@ -486,7 +488,9 @@
        return
      }
      Api.deleteMenuStorage(config.MenuID).then(() => {
      Api.deleteMenuStorage(config.MenuID)
      setTimeout(() => {
        this.setState({
          visible: false,
          confirmLoading: false
@@ -494,7 +498,7 @@
          window.GLOB.CacheMap = new Map()
          MKEmitter.emit('reloadMenuView', config.MenuID)
        })
      })
      }, 100)
    })
  }
@@ -514,14 +518,11 @@
  render() {
    const { components, visible } = this.state
    if (window.GLOB.mkHS || window.GLOB.sysType !== 'local') return null
    return (
      <div className="page-setting-wrap">
        {window.GLOB.sysType === 'local' ? <Button
          icon="setting"
          shape="circle"
          className="page-setting"
          onClick={this.trigger}
        /> : null}
      <div className="tool-wrap">
        <Button icon="setting" shape="circle" onClick={this.trigger}/>
        <Modal
          wrapClassName="custom-setting-modal"
          title={'自定义设置'}
src/tabviews/zshare/settingcomponent/index.scss
@@ -1,27 +1,12 @@
.page-setting-wrap {
  .page-setting {
    position: fixed;
    z-index: 2;
    bottom: 55px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}
.custom-popview {
  .page-setting-wrap {
    display: none;
  }
}
.page-message-wrap.exist + .page-setting-wrap {
  .page-setting {
    bottom: 100px;
  }
}
.custom-setting-modal {
  .ant-modal {
    top: 50px;
    padding-bottom: 5px;
    .ant-modal-footer {
      .ant-btn-danger:hover {
        color: #ffffff!important;
      }
    }
    .ant-modal-body {
      max-height: calc(100vh - 190px);
      min-height: 250px;
src/tabviews/zshare/tablenodes/index.jsx
@@ -473,14 +473,11 @@
    const { config } = this.props
    const { visible, loading, empty, debug } = this.state
    if (window.GLOB.mkHS || window.GLOB.systemType === 'production' || !debug || window.GLOB.sysType === 'cloud') return null
    return (
      <div className={'page-message-wrap ' + (debug && window.GLOB.sysType !== 'cloud' ? 'exist' : '')}>
        {debug && window.GLOB.sysType !== 'cloud' ? <Button
          icon="fork"
          shape="circle"
          className="page-message"
          onClick={this.trigger}
        /> : null}
      <div className="tool-wrap">
        <Button icon="fork" shape="circle" onClick={this.trigger}/>
        <Modal
          title=""
          wrapClassName="view-table-modal"
src/tabviews/zshare/tablenodes/index.scss
@@ -1,14 +1,3 @@
.page-message-wrap {
  .page-message {
    position: fixed;
    z-index: 2;
    bottom: 55px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}
.view-table-modal {
  .ant-modal {
    top: 30px;