Commit 00ff682e authored by cellee's avatar cellee

设施分类图片输入框问题修复,权限文案更改

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent 67e009cb
......@@ -67,8 +67,13 @@ const Facilitys = (props: any) => {
// 拿到key 值 开始存储
let key = info.fileList[0].response.data.identification;
let list = FacilitysList;
list[key].id = key;
list[key].fileList = info.fileList;
list[key] = {
id: key,
fileList: info.fileList,
name: FacilitysList[key].name,
disabled: false,
};
// 存储到mode里面去
dispatch({ type: module + '/genxin', list });
// 当前页面也要刷新
......@@ -80,7 +85,6 @@ const Facilitys = (props: any) => {
// let list: any = [...fileList, ...info.fileList];
// setFileList(list);
console.log(list);
// 将图片信息提交给state
// let data = { val: info.file.name, key: keys };
// dispatch({ type: module + '/retImgsList', data });
......@@ -98,6 +102,7 @@ const Facilitys = (props: any) => {
id: '-1',
fileList: [],
name: '',
disabled: true,
};
// 验证已添加的是否上传完整
let complete = list.every((item: any) => {
......@@ -138,13 +143,9 @@ const Facilitys = (props: any) => {
);
// 输入框内容
const monitor = (e: any) => {
const monitor = (e: any, index: any) => {
let list = FacilitysList;
let { id, value } = e.target;
if (id == 'basic_shebei_0') {
id = 0;
}
list[id].name = value;
list[index].name = e.target.value;
dispatch({ type: module + '/genxin', list });
};
......@@ -181,8 +182,9 @@ const Facilitys = (props: any) => {
placeholder="Facility Name"
disabled={disabled}
id={index}
onChange={(e: any) => monitor(e)}
onChange={(e: any) => monitor(e, index)}
value={FacilitysList[index].name}
disabled={FacilitysList[index].disabled}
/>
</Form.Item>
<div className={'over'}>
......
......@@ -10,9 +10,9 @@ const NoFoundPage: React.FC<{}> = () => (
subTitle=""
>
<div className="desc">
<p style={{ color: '#f00', textTransform: 'capitalize' }}>
<span style={{ color: '#f00', textTransform: 'capitalize' }}>
Sorry, you are not authorized to access this page.
</p>
</span>
</div>
</Result>
<Button type="primary" onClick={() => history.push('/')}>
......
......@@ -265,7 +265,7 @@ const Account = (props: any) => {
const listItems = towAccount.map((item: any) => {
return (
<Option key={item.id} value={item.id}>
{item.tosAccountName}-{item.tosUserEmail}
{item.tosAccountName}
</Option>
);
});
......
......@@ -470,7 +470,7 @@ const Account = (props: any) => {
</Radio.Group>
{/* 选择挂靠的二级菜单 */}
{values === 3 && user.currentUser.userModel.tosUserLevel <= 1 ? (
{values === 3 ? (
<Select
style={{ width: 260 }}
placeholder="Please select affiliated account"
......@@ -479,7 +479,7 @@ const Account = (props: any) => {
>
{DataSave ? (
<Option key={DataSave.userLeader} value={DataSave.userLeader}>
{DataSave.userLeaderAccountName}-{DataSave.userLeaderName}
{DataSave.userLeaderAccountName}
</Option>
) : (
''
......
This diff is collapsed.
import React, { useState, useEffect, useRef } from 'react';
import { Form, Input, Button, message, Descriptions, Spin, Tree, Tag, Select, Modal } from 'antd';
import { Form, Input, Button, message, Descriptions, Spin, Tree, Radio, Select, Modal } from 'antd';
import { connect, history } from 'umi';
import {
EditOutlined,
LeftOutlined,
ExclamationCircleOutlined,
ApartmentOutlined,
} from '@ant-design/icons';
import { EditOutlined, LeftOutlined, ExclamationCircleOutlined } from '@ant-design/icons';
import './Account.less';
import { zhCnFaci, enUsFaci } from '@/utils/power';
......@@ -409,22 +404,32 @@ const Account = (props: any) => {
<div className="label">
<span className="title">Privilege Level:</span>
</div>
<div className="label" style={{ lineHeight: '32px' }}>
{values == 2 ? (
<Tag color="processing" icon={<ApartmentOutlined />}>
Two Level
</Tag>
) : (
<Tag color="processing" icon={<ApartmentOutlined />}>
Three Level
</Tag>
)}
<div className="label">
<Radio.Group value={values} onChange={onRadio}>
<Radio style={radioStyle} disabled value={2}>
Two Level Administrator
</Radio>
<Radio style={radioStyle} disabled value={3}>
Three Level Administrator
</Radio>
</Radio.Group>
{/* 选择挂靠的二级菜单 */}
{values === 3 ? (
<Tag color="default">
{DataSave.userLeaderAccountName}--{DataSave.userLeaderName}
</Tag>
{values === 3 && user.currentUser.userModel.tosUserLevel <= 1 ? (
<Select
style={{ width: 260 }}
placeholder="Please select affiliated account"
disabled
defaultValue={DataSave.userLeader}
>
{DataSave ? (
<Option key={DataSave.userLeader} value={DataSave.userLeader}>
{DataSave.userLeaderAccountName}
</Option>
) : (
''
)}
</Select>
) : (
''
)}
......
......@@ -232,8 +232,6 @@ const Facility = (props: any) => {
// 选择小区名字并赋值
const opname = (value: any) => {
console.log('选择的小区是:' + value);
console.log('储存的小区是:' + ctyName);
if (value == '') {
eliminate();
} else {
......
This diff is collapsed.
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