From 328be53b4461397cd96da79c7e40c892bdb94e2a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 15 六月 2025 21:00:39 +0800 Subject: [PATCH] 2025-06-15 --- src/pc/components/navbar/normal-navbar/menusetting/menutable/index.jsx | 62 +++++++++++++++--------------- 1 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/pc/components/navbar/normal-navbar/menusetting/menutable/index.jsx b/src/pc/components/navbar/normal-navbar/menusetting/menutable/index.jsx index 26f5f43..e0a85cf 100644 --- a/src/pc/components/navbar/normal-navbar/menusetting/menutable/index.jsx +++ b/src/pc/components/navbar/normal-navbar/menusetting/menutable/index.jsx @@ -1,11 +1,11 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Table, Button, Modal, Icon } from 'antd' +import { Table, Button, Modal } from 'antd' +import { PlusOutlined, ArrowUpOutlined, ArrowDownOutlined } from '@ant-design/icons' import MenuForm from '../menuform' import Utils from '@/utils/utils.js' -// import MKEmitter from '@/utils/events.js' import './index.scss' const { confirm } = Modal @@ -21,7 +21,7 @@ editMenu: null, columns: [ { title: '鑿滃崟鍚嶇О', dataIndex: 'name', key: 'name' }, - { title: '鑿滃崟鍙傛暟', dataIndex: 'MenuNo', key: 'MenuNo' }, + // { title: '鑿滃崟鍙傛暟', dataIndex: 'MenuNo', key: 'MenuNo' }, { title: '鑿滃崟灞炴��', dataIndex: 'property', key: 'property', render: text => { const trans = {menu: '鑿滃崟', link: '閾炬帴', linkmenu: '鍏宠仈鑿滃崟', classify: '鍒嗙被'} @@ -42,8 +42,8 @@ (<div> <Button type="link" style={{padding: '0 5px', marginRight: '5px'}} onClick={() => this.editMenu(record)}>缂栬緫</Button> <Button type="link" style={{color: '#ff4d4f', padding: '0 5px', marginRight: '5px'}} onClick={() => this.delMenu(record)}>鍒犻櫎</Button> - <Icon type="arrow-up" style={{color: '#26C281', cursor: 'pointer', padding: '0 5px', marginRight: '5px'}} onClick={() => this.moveUp(record)}/> - <Icon type="arrow-down" style={{color: '#ff4d4f', cursor: 'pointer', padding: '0 5px'}} onClick={() => this.moveDown(record)}/> + <ArrowUpOutlined style={{color: '#26C281', cursor: 'pointer', padding: '0 5px', marginRight: '5px'}} onClick={() => this.moveUp(record)}/> + <ArrowDownOutlined style={{color: '#ff4d4f', cursor: 'pointer', padding: '0 5px'}} onClick={() => this.moveDown(record)}/> </div>) } ] @@ -88,15 +88,15 @@ delMenu = (record) => { const { menu } = this.props - const _this = this + const that = this confirm({ title: '纭畾鍒犻櫎鍚楋紵', content: '', onOk() { - let _data = _this.state.data.filter(item => item.MenuID !== record.MenuID) - _this.setState({data: _data}) - _this.props.menuUpdate({...menu, sublist: _data}) + let _data = that.state.data.filter(item => item.MenuID !== record.MenuID) + that.setState({data: _data}) + that.props.menuUpdate({...menu, sublist: _data}) }, onCancel() {} }) @@ -137,7 +137,7 @@ }) } if (editMenu.MenuID && editMenu.property === 'menu' && _menu.property !== 'menu') { - const _this = this + const that = this confirm({ content: '鑿滃崟灏嗚閲嶇疆锛岀‘瀹氫慨鏀瑰悧锛�', onOk() { @@ -147,8 +147,8 @@ } return item }) - _this.setState({data: _data, editMenu: null, visible: false}) - _this.props.menuUpdate({...menu, sublist: _data}) + that.setState({data: _data, editMenu: null, visible: false}) + that.props.menuUpdate({...menu, sublist: _data}) }, onCancel() {} }) @@ -164,7 +164,7 @@ return ( <div className="thdmenu-control-wrap"> - <Icon type="plus" style={{color: '#26C281', padding: '5px', fontSize: '16px'}} onClick={this.plusMenu}/> + <PlusOutlined style={{color: '#26C281', padding: '5px', fontSize: '16px'}} onClick={this.plusMenu}/> <Table rowKey="MenuID" size="small" @@ -203,7 +203,7 @@ editMenu: null, columns: [ { title: '鑿滃崟鍚嶇О', dataIndex: 'name', key: 'name' }, - { title: '鑿滃崟鍙傛暟', dataIndex: 'MenuNo', key: 'MenuNo' }, + // { title: '鑿滃崟鍙傛暟', dataIndex: 'MenuNo', key: 'MenuNo' }, { title: '鑿滃崟灞炴��', dataIndex: 'property', key: 'property', render: text => { const trans = {menu: '鑿滃崟', link: '閾炬帴', linkmenu: '鍏宠仈鑿滃崟', classify: '鍒嗙被'} @@ -224,8 +224,8 @@ (<div> <Button type="link" style={{padding: '0 5px', marginRight: '5px'}} onClick={() => this.editMenu(record)}>缂栬緫</Button> <Button type="link" style={{color: '#ff4d4f', padding: '0 5px', marginRight: '5px'}} onClick={() => this.delMenu(record)}>鍒犻櫎</Button> - <Icon type="arrow-up" style={{color: '#26C281', cursor: 'pointer', padding: '0 5px', marginRight: '5px'}} onClick={() => this.moveUp(record)}/> - <Icon type="arrow-down" style={{color: '#ff4d4f', cursor: 'pointer', padding: '0 5px'}} onClick={() => this.moveDown(record)}/> + <ArrowUpOutlined style={{color: '#26C281', cursor: 'pointer', padding: '0 5px', marginRight: '5px'}} onClick={() => this.moveUp(record)}/> + <ArrowDownOutlined style={{color: '#ff4d4f', cursor: 'pointer', padding: '0 5px'}} onClick={() => this.moveDown(record)}/> </div>) } ] @@ -271,15 +271,15 @@ delMenu = (record) => { const { menu } = this.props - const _this = this + const that = this confirm({ title: (record.property === 'classify' && record.sublist.length > 0 ? '鑿滃崟涓嬪惈鏈夊瓙鑿滃崟锛�' : '') + '纭畾鍒犻櫎鍚楋紵', content: '', onOk() { - let _data = _this.state.data.filter(item => item.MenuID !== record.MenuID) - _this.setState({data: _data}) - _this.props.menuUpdate({...menu, sublist: _data}) + let _data = that.state.data.filter(item => item.MenuID !== record.MenuID) + that.setState({data: _data}) + that.props.menuUpdate({...menu, sublist: _data}) }, onCancel() {} }) @@ -320,7 +320,7 @@ }) } if (editMenu.MenuID && editMenu.property === 'menu' && _menu.property !== 'menu') { - const _this = this + const that = this confirm({ content: '鑿滃崟灏嗚閲嶇疆锛岀‘瀹氫慨鏀瑰悧锛�', onOk() { @@ -330,8 +330,8 @@ } return item }) - _this.setState({data: _data, editMenu: null, visible: false}) - _this.props.menuUpdate({...menu, sublist: _data}) + that.setState({data: _data, editMenu: null, visible: false}) + that.props.menuUpdate({...menu, sublist: _data}) }, onCancel() {} }) @@ -362,7 +362,7 @@ return ( <div className="submenu-control-wrap"> - <Icon type="plus" style={{color: '#26C281', padding: '5px', fontSize: '16px'}} onClick={this.plusMenu}/> + <PlusOutlined style={{color: '#26C281', padding: '5px', fontSize: '16px'}} onClick={this.plusMenu}/> <Table size="middle" rowKey="MenuID" @@ -402,7 +402,7 @@ editMenu: null, columns: [ { title: '鑿滃崟鍚嶇О', dataIndex: 'name', key: 'name' }, - { title: '鑿滃崟鍙傛暟', dataIndex: 'MenuNo', key: 'MenuNo' }, + // { title: '鑿滃崟鍙傛暟', dataIndex: 'MenuNo', key: 'MenuNo' }, { title: '鑿滃崟灞炴��', dataIndex: 'property', key: 'property', render: text => { const trans = {menu: '鑿滃崟', link: '閾炬帴', linkmenu: '鍏宠仈鑿滃崟', classify: '鍒嗙被'} @@ -423,8 +423,8 @@ (<div> <Button type="link" style={{padding: '0 5px', marginRight: '5px'}} onClick={() => this.editMenu(record)}>缂栬緫</Button> <Button type="link" style={{color: '#ff4d4f', padding: '0 5px', marginRight: '5px'}} onClick={() => this.delMenu(record)}>鍒犻櫎</Button> - <Icon type="arrow-up" style={{color: '#26C281', cursor: 'pointer', padding: '0 5px', marginRight: '5px'}} onClick={() => this.moveUp(record)}/> - <Icon type="arrow-down" style={{color: '#ff4d4f', cursor: 'pointer', padding: '0 5px'}} onClick={() => this.moveDown(record)}/> + <ArrowUpOutlined style={{color: '#26C281', cursor: 'pointer', padding: '0 5px', marginRight: '5px'}} onClick={() => this.moveUp(record)}/> + <ArrowDownOutlined style={{color: '#ff4d4f', cursor: 'pointer', padding: '0 5px'}} onClick={() => this.moveDown(record)}/> </div>) } ] @@ -466,13 +466,13 @@ delMenu = (record) => { const { data } = this.state - const _this = this + const that = this confirm({ title: (record.property === 'classify' && record.sublist.length > 0 ? '鑿滃崟涓嬪惈鏈夊瓙鑿滃崟锛�' : '') + '纭畾鍒犻櫎鍚楋紵', content: '', onOk() { - _this.setState({data: data.filter(item => item.MenuID !== record.MenuID)}) + that.setState({data: data.filter(item => item.MenuID !== record.MenuID)}) }, onCancel() {} }) @@ -513,7 +513,7 @@ } if (editMenu.MenuID && editMenu.property === 'menu' && _menu.property !== 'menu') { - const _this = this + const that = this confirm({ content: '鑿滃崟灏嗚閲嶇疆锛岀‘瀹氫慨鏀瑰悧锛�', onOk() { @@ -523,7 +523,7 @@ } return item }) - _this.setState({data: _data, editMenu: null, visible: false}) + that.setState({data: _data, editMenu: null, visible: false}) }, onCancel() {} }) -- Gitblit v1.8.0