king
2024-10-31 602ed54eaad8bcff9b360584a5e0f50e50ded380
2024-10-31
15个文件已修改
3个文件已添加
301 ■■■■■ 已修改文件
public/README.txt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/options.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/breadview/index.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.scss 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/sysmessage.jsx 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tabview/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/index.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/sysmessage/index.jsx 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/sysmessage/index.scss 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.jsx 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/treepageconfig/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/option.js 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/design/sidemenu/thdmenuplus/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/interface/workspace/request/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/homeform/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/menuform/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tabledesign/menuform/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/README.txt
@@ -22,5 +22,6 @@
transfer          -- 是否使用转接口,使用转接口时请设置为 true, 使用转接口时,外部接口调用前不会做登录验证
keepPwd           -- 记住密码,默认开启,当值为 false 时禁用,当值为 invisible 时记住密码但密码不可查看
execType          -- 脚本传输方式,值为x时,启用AES加密
SysNotice         -- 是否开启系统消息
updateStatus      -- 是否更新开发状态,默认开启,当值为 false 时禁用
forcedUpdate      -- 传输号升级时,是否自动退出,格式为(YYYY-MM-DD),用于升级后刷新用户本地配置
public/options.json
@@ -20,6 +20,7 @@
  "transfer": "false",
  "keepPwd": "true",
  "execType": "x",
  "SysNotice": "false",
  "host": "http://qingqiumarket.cn",
  "service": "MKWMS/"
}
src/components/breadview/index.jsx
@@ -17,6 +17,7 @@
const TreePage = asyncComponent(() => import('@/tabviews/treepage'))
const Iframe = asyncComponent(() => import('@/tabviews/iframe'))
const RoleManage = asyncComponent(() => import('@/tabviews/rolemanage'))
const SysMessage = asyncComponent(() => import('@/tabviews/sysmessage'))
if (sessionStorage.getItem('lang') === 'zh-CN') {
  moment.locale('zh-cn')
@@ -124,6 +125,8 @@
      return (<Home MenuID={view.MenuID} MenuName={view.MenuName}/>)
    } else if (view.type === 'RolePermission') {
      return (<RoleManage MenuID={view.MenuID}/>)
    } else if (view.type === 'SysMessage') {
      return (<SysMessage />)
    } else if (view.type === 'CommonTable') {
      return (<CommonTable MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} param={view.param} changeTemp={this.changeTemp}/>)
    } else if (view.type === 'TreePage') {
src/components/header/index.jsx
@@ -18,6 +18,7 @@
const Resetpwd = asyncComponent(() => import('@/components/resetPassword'))
const QrCode = asyncComponent(() => import('@/components/qrcode'))
const LoginForm = asyncSpinComponent(() => import('./loginform'))
const SysMessage = asyncComponent(() => import('./sysmessage'))
class Header extends Component {
  state = {
@@ -331,7 +332,7 @@
                ParentNames: [fst.MenuName, snd.MenuName],
                MenuNo: trd.MenuNo,
                EasyCode: trd.EasyCode,
                type: 'CommonTable',
                type: 'CustomPage',
                OpenType: 'newtab',
                hidden: 'false'
              }
@@ -340,7 +341,7 @@
                try {
                  let PageParam = JSON.parse(trd.PageParam)
                  trdItem.type = PageParam.Template || 'CommonTable'
                  trdItem.type = PageParam.Template || 'CustomPage'
                  trdItem.OpenType = PageParam.OpenType || 'newtab'
                  trdItem.hidden = PageParam.hidden || 'false'
                  trdItem.menuColor = PageParam.menuColor || ''
@@ -787,6 +788,7 @@
            <SearchOutlined className="search-menu" />
          </Dropdown> : null
        }
        {window.GLOB.SysNotice ? <SysMessage /> : null}
        {/* 头像、用户名 */}
        <Dropdown className="header-setting" overlay={menu}>
          <div>
src/components/header/index.scss
@@ -309,4 +309,38 @@
      margin-top: 15px;
    }
  }
}
.mk-msg-icon {
  font-size: 16px;
  margin-top: 17px;
  margin-right: 20px;
  margin-left: 0px;
  color: #1CD66C;
  cursor: pointer;
}
.mk-msg-icon[data-title] {
  position: relative;
  &::before {
    content: " ";
    position: absolute;
    top: 6px;
    left: 2px;
    z-index: -1;
    width: 12px;
    height: 3px;
    display: block;
    background: #fff;
  }
  &::after {
    position: absolute;
    top: -10px;
    left: 15px;
    color: #f5222d;
    font-size: 12px;
    line-height: 16px;
    white-space: nowrap;
    font-weight: 600;
    content: attr(data-title);
  }
}
src/components/header/sysmessage.jsx
New file
@@ -0,0 +1,32 @@
import React, { Component } from 'react'
import { MessageFilled } from '@ant-design/icons'
import MKEmitter from '@/utils/events.js'
class SysMessage extends Component {
  state = {
  }
  UNSAFE_componentWillMount () {
  }
  open = () => {
    let menu = {
      MenuID: 'message_page_id',
      MenuName: '系统消息',
      type: 'SysMessage'
    }
    MKEmitter.emit('modifyTabs', menu)
  }
  render() {
    return (
      <MessageFilled className="mk-msg-icon" data-title="23" onClick={this.open} />
    )
  }
}
export default SysMessage
src/components/tabview/index.jsx
@@ -18,6 +18,7 @@
const TreePage = asyncComponent(() => import('@/tabviews/treepage'))
const Iframe = asyncComponent(() => import('@/tabviews/iframe'))
const RoleManage = asyncComponent(() => import('@/tabviews/rolemanage'))
const SysMessage = asyncComponent(() => import('@/tabviews/sysmessage'))
if (sessionStorage.getItem('lang') === 'zh-CN') {
  moment.locale('zh-cn')
@@ -276,18 +277,20 @@
  selectcomponent = (view) => {
    // 根据tab页中菜单信息,选择所需的组件
    if (view.type === 'Home') {
      return (<Home MenuID={view.MenuID} MenuName={view.MenuName}/>)
    } else if (view.type === 'BaseTable') {
    if (view.type === 'BaseTable') {
      return (<BaseTable MenuID={view.MenuID} MenuName={view.MenuName} param={view.param} changeTemp={this.changeTemp}/>)
    } else if (view.type === 'CustomPage') {
      return (<CustomPage MenuID={view.MenuID} MenuName={view.MenuName} param={view.param} changeTemp={this.changeTemp}/>)
    } else if (view.type === 'Home') {
      return (<Home MenuID={view.MenuID} MenuName={view.MenuName}/>)
    } else if (view.type === 'RolePermission') {
      return (<RoleManage MenuID={view.MenuID}/>)
    } else if (view.type === 'SysMessage') {
      return (<SysMessage />)
    } else if (view.type === 'CommonTable') {
      return (<CommonTable MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} param={view.param} changeTemp={this.changeTemp}/>)
    } else if (view.type === 'TreePage') {
      return (<TreePage MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} param={view.param}/>)
    } else if (view.type === 'RolePermission') {
      return (<RoleManage MenuID={view.MenuID}/>)
    } else if (view.type === 'iframe') {
      return (<Iframe MenuID={view.MenuID} title={view.MenuName} url={view.src}/>)
    } else {
src/index.js
@@ -52,6 +52,7 @@
    GLOB.WXminiAppID = config.WXminiAppID || ''
    GLOB.WXMerchID = config.WXMerchID || ''
    GLOB.WXNotice = config.WXNotice + '' === 'true'
    GLOB.SysNotice = config.SysNotice + '' === 'true'
    GLOB.execType = config.execType === 'x' ? 'x' : ''
    GLOB.mkHS = false
    GLOB.debugger = false
src/tabviews/sysmessage/index.jsx
New file
@@ -0,0 +1,78 @@
import React, { Component } from 'react'
// import { is, fromJS } from 'immutable'
import { notification, Spin } from 'antd'
// import { BankOutlined } from '@ant-design/icons'
import Api from '@/api'
import MKEmitter from '@/utils/events.js'
import './index.scss'
export default class SysMessage extends Component {
  state = {
    loading: true
  }
  getAppList = () => {
    let param = {
      func: 's_get_kei'
    }
    Api.getSystemConfig(param).then(result => {
      if (result.status) {
        let applist = result.data.map(item => {
          item.sublist = item.data_detail || []
          item.sublist = item.sublist.map(cell => {
            cell.ID = cell.d_id
            return cell
          })
          return item
        })
        let selectApp = applist[0] || null
        this.setState({ applist, selectApp })
      } else {
        notification.warning({
          top: 92,
          message: result.message,
          duration: 5
        })
      }
    })
  }
  reloadMenuView = (menuId) => {
    if (menuId !== 'message_page_id') return
    this.getAppList()
  }
  UNSAFE_componentWillMount () {
  }
  componentDidMount () {
    MKEmitter.addListener('reloadMenuView', this.reloadMenuView)
  }
  /**
   * @description 组件销毁,清除state更新
   */
  componentWillUnmount () {
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('reloadMenuView', this.reloadMenuView)
  }
  render() {
    const { loading, } = this.state
    return (
      <div className="mk-sys-message">
        {loading && <Spin />}
      </div>
    )
  }
}
src/tabviews/sysmessage/index.scss
New file
@@ -0,0 +1,12 @@
.mk-sys-message {
  min-height: calc(100vh - 94px);
  height: 100%;
  position: relative;
  padding: 15px;
  .ant-spin {
    position: absolute;
    top: calc(50vh - 100px);
    left: calc(50vw - 12px);
  }
}
src/templates/comtableconfig/index.jsx
@@ -3,8 +3,8 @@
import { is, fromJS } from 'immutable'
import { DndProvider } from 'react-dnd'
import HTML5Backend from 'react-dnd-html5-backend'
import { Button, Card, Collapse, notification, Spin, Tooltip, Col } from 'antd'
import { QuestionCircleOutlined, RedoOutlined } from '@ant-design/icons'
import { Button, Card, Collapse, notification, Spin, Col } from 'antd'
import { RedoOutlined } from '@ant-design/icons'
import Api from '@/api'
import Utils from '@/utils/utils.js'
@@ -16,21 +16,16 @@
import ColumnComponent from '@/templates/sharecomponent/columncomponent'
import MenuForm from './menuform'
import SourceElement from '@/templates/zshare/dragsource'
import Source from './source'
import './index.scss'
const { Panel } = Collapse
// const Versions = asyncComponent(() => import('@/menu/versions'))
const UrlFieldComponent = asyncComponent(() => import('@/menu/urlfieldcomponent'))
// const ReplaceField = asyncComponent(() => import('@/menu/replaceField'))
const UpdateTable = asyncComponent(() => import('./updatetable'))
const Unattended = asyncComponent(() => import('@/templates/zshare/unattended'))
// const EditComponent = asyncComponent(() => import('@/templates/zshare/editcomponent'))
const SettingComponent = asyncComponent(() => import('@/templates/sharecomponent/settingcomponent'))
const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent'))
const FieldsComponent = asyncComponent(() => import('@/templates/sharecomponent/fieldscomponent'))
const ChartGroupComponent = asyncComponent(() => import('@/templates/sharecomponent/chartgroupcomponent'))
const ChartComponent = asyncComponent(() => import('@/templates/sharecomponent/chartcomponent'))
const CardComponent = asyncComponent(() => import('@/templates/sharecomponent/cardcomponent'))
@@ -1076,8 +1071,6 @@
    if (!config) return null
    const confActions = config.action.filter(_action => !_action.origin && (['pop', 'popview'].includes(_action.OpenType) || (_action.OpenType === 'tab' && _action.tabTemplate === 'FormTab') || (_action.OpenType === 'funcbutton' && _action.execMode === 'pop')))
    let configTabs = []
    config.tabgroups.forEach(group => {
      configTabs.push(...group.sublist)
@@ -1107,74 +1100,6 @@
                  containerId="main-basedata"
                  updatetable={this.updateconfig}
                />
              </Panel>
              {/* 搜索条件添加 */}
              <Panel header="搜索" key="1">
                <div className="search-element">
                  {Source.searchItems.map((item, index) => (<SourceElement key={index} content={item}/>))}
                </div>
                <FieldsComponent config={config} type="search" />
              </Panel>
              {/* 按钮添加 */}
              <Panel header="按钮" key="2">
                <div className="search-element">
                  {Source.actionItems.map((item, index) => (<SourceElement key={index} content={item}/>))}
                </div>
                <div className="config-btn">
                  {confActions.length > 0 ?
                    <p className="config-btn-title">
                      <Tooltip placement="topLeft" title="点击按钮,可完成或查看按钮配置信息。">
                        <QuestionCircleOutlined className="mk-form-tip"/>
                      </Tooltip>
                      按钮配置
                    </p> : null
                  }
                </div>
                {confActions.map((item, index) => {
                  return (
                    <div key={index}>
                      <Button
                        icon={item.icon}
                        style={{marginBottom: '10px'}}
                        className={'config-button mk-btn mk-' + item.class}
                        onClick={() => this.setSubConfig(item, 'button')}
                      >{item.label}</Button>
                    </div>
                  )
                })}
              </Panel>
              {/* 添加显示列 */}
              <Panel header="显示列" key="3">
                <div className="search-element">
                  {Source.columnItems.map((item, index) => (<SourceElement key={index} content={item}/>))}
                </div>
                <FieldsComponent config={config} type="columns"/>
              </Panel>
              {/* 添加标签 */}
              <Panel header="标签页" key="4">
                <div className="search-element">
                  {Source.tabItems.map((item, index) => (<SourceElement key={index} content={item}/>))}
                </div>
                {configTabs.length > 0 ?
                  <p className="config-btn-title">
                    <Tooltip placement="topLeft" title="点击按钮,可完成或查看标签配置信息。">
                      <QuestionCircleOutlined className="mk-form-tip"/>
                    </Tooltip>
                    标签配置
                  </p> : null
                }
                {configTabs.map((item, index) => {
                  return (
                    <div key={index}>
                      <Button
                        className="config-button"
                        icon={item.icon}
                        style={{marginBottom: '10px'}}
                        onClick={() => this.setSubConfig(item, 'tab')}
                      >{item.label}</Button>
                    </div>
                  )
                })}
              </Panel>
            </Collapse>
          </div>
src/templates/treepageconfig/index.jsx
@@ -72,7 +72,6 @@
    _config.MenuID = menu.MenuID || ''
    // 配置默认值,兼容
    // _config.Template = 'TreePage'
    _config.easyCode = _config.easyCode || ''
    
    if (_config.type === 'user') {
src/utils/option.js
@@ -42,13 +42,6 @@
// 系统模板
export const sysTemps = [
  // {
  //   title: '基础表格',
  //   type: 'CommonTable',
  //   url: nortable,
  //   baseconfig: '',
  //   isSystem: true
  // },
  {
    title: '基础表格',
    type: 'BaseTable',
@@ -56,14 +49,6 @@
    baseconfig: '',
    isSystem: true
  },
  // {
  //   title: '主子表表格',
  //   type: 'CommonTable',
  //   url: mainsubtable,
  //   baseconfig: '',
  //   isSystem: true,
  //   isSubtable: true
  // },
  {
    title: '自定义',
    type: 'CustomPage',
@@ -71,13 +56,6 @@
    baseconfig: '',
    isSystem: true
  },
  // {
  //   title: '树形页面',
  //   type: 'TreePage',
  //   url: treepage,
  //   baseconfig: '',
  //   isSystem: true
  // },
  {
    title: '外部页面',
    type: 'NewPage',
src/views/design/sidemenu/thdmenuplus/index.jsx
@@ -14,8 +14,6 @@
import asyncComponent from '@/utils/asyncComponent'
import mainsubtable from '@/assets/img/mainsubtable.jpg'
import treepage from '@/assets/img/treepage.jpg'
import calendar from '@/assets/img/calendar.jpg'
import customImg from '@/assets/img/custom.jpg'
import './index.scss'
@@ -52,8 +50,6 @@
    const illust = { // 模板图片,用于已使用模板
      BaseTable: mainsubtable,
      TreePage: treepage,
      CalendarPage: calendar,
      CustomPage: customImg
    }
src/views/interface/workspace/request/index.jsx
@@ -155,7 +155,7 @@
      }, (err) => {
        this.handleResponse(err)
      })
    } else if (/dostars/ig.test(url)) {
    } else if (/dostars|exstars/ig.test(url)) {
      if (n) {
        n = JSON.parse(n)
src/views/menudesign/homeform/index.jsx
@@ -58,14 +58,14 @@
                    EasyCode: trd.EasyCode,
                    value: trd.MenuID,
                    label: trd.MenuName,
                    type: 'CommonTable',
                    type: 'CustomPage',
                    disabled: false
                  }
                  if (trd.PageParam) {
                    try {
                      trd.PageParam = JSON.parse(trd.PageParam)
                      trdItem.type = trd.PageParam.Template || 'CommonTable'
                      trdItem.type = trd.PageParam.Template || 'CustomPage'
                    } catch (e) {
                    }
src/views/menudesign/menuform/index.jsx
@@ -125,14 +125,14 @@
                    EasyCode: trd.EasyCode,
                    value: trd.MenuID,
                    label: trd.MenuName,
                    type: 'CommonTable',
                    type: 'CustomPage',
                    disabled: false
                  }
                  if (trd.PageParam) {
                    try {
                      trd.PageParam = JSON.parse(trd.PageParam)
                      trdItem.type = trd.PageParam.Template || 'CommonTable'
                      trdItem.type = trd.PageParam.Template || 'CustomPage'
                    } catch (e) {
                    }
src/views/tabledesign/menuform/index.jsx
@@ -120,14 +120,14 @@
                    EasyCode: trd.EasyCode,
                    value: trd.MenuID,
                    label: trd.MenuName,
                    type: 'CommonTable',
                    type: 'CustomPage',
                    disabled: false
                  }
                  if (trd.PageParam) {
                    try {
                      trd.PageParam = JSON.parse(trd.PageParam)
                      trdItem.type = trd.PageParam.Template || 'CommonTable'
                      trdItem.type = trd.PageParam.Template || 'CustomPage'
                    } catch (e) {
                    }