Commit 5e30ca6c by wufan

fix:去掉无用代码

parent ccb56123
/*
* @Author: 吴文洁
* @Date: 2019-07-10 10:30:49
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-08 20:09:55
* @LastEditors: wufan
* @LastEditTime: 2020-12-09 10:57:57
* @Description:
*/
import React, { useContext, useEffect, useState } from 'react';
......@@ -11,10 +11,8 @@ import {ConfigProvider } from 'antd';
import Header from './Header'
import Menu from './Menu'
import Main from './Main'
import { Route, Switch } from 'react-router-dom'
import zhCN from 'antd/es/locale/zh_CN'
import User from '@/common/js/user';
import axios from 'axios';
import BaseService from "@/domains/basic-domain/baseService";
import { XMContext } from '@/store/context';
import { setStoreGroupPermission, setStorePermission, setStoreGroupList, setStoreList } from '@/store/actions/index';
......@@ -23,7 +21,6 @@ declare var window: any;
const App: React.FC = (props: any) => {
const ctx: any = useContext(XMContext);
const userId = User.getUserId();
const [menuType,setMenuType] = useState(true)
window.ctx = ctx;
useEffect(() => {
......
......@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-11-27 16:21:49
* @LastEditors: wufan
* @LastEditTime: 2020-12-08 19:08:57
* @LastEditTime: 2020-12-09 10:56:50
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -80,14 +80,6 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
wrapperCol: { span: 12 },
};
const onFinish = (values: any) => {
console.log("Success:", values);
};
const onFinishFailed = (errorInfo: any) => {
console.log("Failed:", errorInfo);
};
function handleChangeRole(value: string) {
setRole(value);
}
......@@ -118,7 +110,6 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
function handleOk(): void {
const values = form.getFieldsValue();
console.log("values", values);
if (!values.nickName.trim()) {
setNameErrorMsg("请输入员工姓名");
setNameStatus("error");
......@@ -217,8 +208,6 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
form={form}
name="basic"
initialValues={{ nickName: nickName, phone: phone, role: role }}
onFinish={onFinish}
onFinishFailed={onFinishFailed}
>
<Form.Item
label="员工姓名"
......@@ -229,7 +218,6 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
>
<Input
style={{ width: 200 }}
// value={nickName}
placeholder="请输入员工名称"
maxLength={15}
onChange={(e) => handleChangeValues("nickName", e.target.value)}
......@@ -245,7 +233,6 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
>
<InputNumber
style={{ width: 200 }}
// value={phone}
placeholder="请输入手机号"
maxLength={11}
disabled={!!props.choosedItem.nickName}
......@@ -259,7 +246,6 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
rules={[{ required: false }]}
>
<RadioGroup
// value={role}
onChange={(e) => {
handleChangeValues("role", e.target.value);
}}
......
......@@ -9,16 +9,14 @@ import React, { useEffect, useState } from "react";
import { withRouter } from "react-router-dom";
import _ from "underscore";
import PageControl from "@/components/PageControl";
import { CheckBox, SearchBar } from "@/components";
import { Button, Table, Tooltip, Modal, message, Row, Col, Input } from "antd";
import { CheckBox } from "@/components";
import { Button, Table, Modal, message, Input } from "antd";
import { QuestionCircleOutlined } from "@ant-design/icons";
import { storeRoleEnum } from "@/domains/store-domain/constants";
import StoreService from "@/domains/store-domain/storeService";
import EmployeeAddOrEditModal from "./EmployeeAddOrEditModal";
import User from "@/common/js/user";
import "./EmployeesManagePage.less";
import { string } from "prop-types";
const { confirm } = Modal;
const { Search } = Input;
......@@ -116,14 +114,6 @@ function EmployeesManagePage() {
return _item.roleCode !== "StoreManager";
});
// _data = _.map(_data, (item: any) => {
// item.isChecked = true;
// _query.roleCodes.push(item.roleCode);
// return item;
// });
// setQuery(_query);
setRoleIds(_data);
});
}
......@@ -254,7 +244,6 @@ function EmployeesManagePage() {
function handleQuery(name: string, value: any) {
const _query = _.clone(query);
// _query[name] = value;
setQuery(_query);
}
......
......@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditTime: 2020-12-08 13:42:55
* @LastEditTime: 2020-12-09 10:57:18
* @Description: 用户管理页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -78,11 +78,6 @@ function UserManagePage() {
];
}
function handleQuery(name: string, value: any) {
const _query = _.clone(query);
// _query[name] = value;
setQuery(_query);
}
return (
<div className=" page user-manage-page">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment