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