Commit 818d1fca authored by cellee's avatar cellee

Merge branch 'final' of http://120.77.240.215:9701/Maple/tostumi.git into final

parents 5c2421a0 1073fb5c
......@@ -112,7 +112,7 @@ const Card = (props: any) => {
}, [Data7]);
const goToDetail = (values: any, e: any) => {
if (permissionArr.indexOf('12') < 0) {
if (permissionArr.indexOf('30') < 0) {
message.error('No Permissions!!!', 3);
return;
}
......@@ -120,6 +120,10 @@ const Card = (props: any) => {
};
const goToAdd = () => {
if (permissionArr.indexOf('32') < 0) {
message.error('No Permissions!!!', 3);
return;
}
history.push('./AccessCardApplication/Add');
};
......
......@@ -51,6 +51,12 @@ const CardDetail = (props: any) => {
}, [DataSaveDetail]);
const onFinish = (values: any) => {
const permissionArr = JSON.parse(localStorage.getItem('permission') || '');
if (permissionArr.indexOf('31') < 0) {
message.error('No Permissions!!!', 3);
return;
}
if (values.applyStatus === '2' && !values.replyContent) {
message.error('Replies must be filled in!', 3);
return;
......
import React, { useState, useEffect, useRef } from 'react';
import styles from './css/Detail.less';
import { Form, Row, Col, Spin, Button, Descriptions } from 'antd';
import { Form, Row, Col, Spin, Button, Descriptions, message } from 'antd';
import { connect } from 'umi';
import TextArea from 'antd/lib/input/TextArea';
......@@ -76,6 +76,35 @@ const Detail = (props: any) => {
}, [CurDataDetail]);
const onFinish = (values: any) => {
const permissionArr = JSON.parse(localStorage.getItem('permission') || '');
if (location.query.serviceType === '1') {
if (permissionArr.indexOf('19') < 0) {
message.error('No Permissions!!!', 3);
return;
}
} else if (location.query.serviceType === '2') {
if (permissionArr.indexOf('38') < 0) {
message.error('No Permissions!!!', 3);
return;
}
} else if (location.query.serviceType === '3') {
if (permissionArr.indexOf('22') < 0) {
message.error('No Permissions!!!', 3);
return;
}
} else if (location.query.serviceType === '4') {
if (permissionArr.indexOf('35') < 0) {
message.error('No Permissions!!!', 3);
return;
}
} else if (location.query.serviceType === '5') {
if (permissionArr.indexOf('25') < 0) {
message.error('No Permissions!!!', 3);
return;
}
}
var val = values;
val.handleName = getCookie('name');
val.handleContacts = getCookie('phone');
......
......@@ -86,10 +86,35 @@ const PropertyServices = (props: any) => {
];
const goToDetail = (value: any, record: any, e: any) => {
if (permissionArr.indexOf('12') < 0) {
message.error('No Permissions!!!', 3);
return;
console.log(serviceTypeGobal);
if (serviceTypeGobal === '1') {
if (permissionArr.indexOf('18') < 0) {
message.error('No Permissions!!!', 3);
return;
}
} else if (serviceTypeGobal === '2') {
if (permissionArr.indexOf('37') < 0) {
message.error('No Permissions!!!', 3);
return;
}
} else if (serviceTypeGobal === '3') {
if (permissionArr.indexOf('21') < 0) {
message.error('No Permissions!!!', 3);
return;
}
} else if (serviceTypeGobal === '4') {
if (permissionArr.indexOf('34') < 0) {
message.error('No Permissions!!!', 3);
return;
}
} else if (serviceTypeGobal === '5') {
if (permissionArr.indexOf('24') < 0) {
message.error('No Permissions!!!', 3);
return;
}
}
//页面递进
history.push(
location.pathname +
......
......@@ -5,7 +5,7 @@ import { connect, history } from 'umi';
import TitleSearch from '../../components/TitleSearch/TitleSearch';
import { RA, SA, urlEncode, filterObj, filterObjbyTg } from '@/utils/method';
import { RA, urlEncode, filterObjbyTg } from '@/utils/method';
import { objectColumns, stringTab } from '@/utils/string';
import { timestampToTime } from '@/utils/time';
......@@ -102,7 +102,7 @@ const Renovation = (props: any) => {
};
const goToDetail = (values: any, e: any) => {
if (permissionArr.indexOf('12') < 0) {
if (permissionArr.indexOf('27') < 0) {
message.error('No Permissions!!!', 3);
return;
}
......
......@@ -46,6 +46,12 @@ const RenovationDetail = (props: any) => {
}, [DataSaveDetail]);
const onFinish = (values: any) => {
const permissionArr = JSON.parse(localStorage.getItem('permission') || '');
if (permissionArr.indexOf('28') < 0) {
message.error('No Permissions!!!', 3);
return;
}
if (
values.decorationStatus === '2' &&
(values.replyView == undefined || values.replyView.trim() === '')
......
......@@ -45,7 +45,7 @@ const ChargeManager = (props: any) => {
// 详情页
const goToDetail = (values: any) => {
const permissionArr = JSON.parse(localStorage.getItem('permission') || '');
if (permissionArr.indexOf('10') < 0) {
if (permissionArr.indexOf('16') < 0) {
message.error('No Permissions!!!', 3);
return;
}
......
......@@ -16,7 +16,7 @@ const Detail = (props: any) => {
const status = ['Normal', 'Cancelled'];
const [loading, setLoding] = useState(false);
const permissionArr = JSON.parse(localStorage.getItem('permission') || '');
const TosSecurityGuarderGet = (values: any) => {
dispatch({ type: 'ServiceProvider/TosSecurityGuarderGet', playload: values });
};
......@@ -45,6 +45,10 @@ const Detail = (props: any) => {
// 保安详情页
const goToGuard = (values: any, e: any) => {
if (permissionArr.indexOf('13') < 0) {
message.error('No Permissions!!!', 3);
return;
}
GuarderById(values);
history.push(location.pathname + '/Guard?saferName=' + values.saferName);
};
......@@ -77,8 +81,7 @@ const Detail = (props: any) => {
// 注销
const handleClick = (id: string) => {
const permissionArr = JSON.parse(localStorage.getItem('permission') || '');
if (permissionArr.indexOf('9') < 0) {
if (permissionArr.indexOf('12') < 0) {
message.error('No Permissions!!!', 3);
return;
}
......@@ -104,7 +107,6 @@ const Detail = (props: any) => {
setLoding(false);
if (Result) {
message.success('Logout successful!');
console.log('跳转页面');
history.goBack();
} else {
message.error('Logout failed. Please try again!', 3);
......
import React, { useState, useEffect } from 'react';
import React, { useEffect } from 'react';
import styles from './Guard.less';
import { Modal, Button } from 'antd';
import { Modal, Button, message } from 'antd';
import { ExclamationCircleOutlined } from '@ant-design/icons';
const { confirm } = Modal;
import { Link, useIntl, connect, Dispatch } from 'umi';
import { connect } from 'umi';
import Line from '../../../components/Line/Line';
import BackButton from '../../../components/BackButton/BackButton';
......@@ -23,6 +23,11 @@ const Guard = (props: any) => {
// 删除保安
const handleClickBtn = (id: string) => {
const permissionArr = JSON.parse(localStorage.getItem('permission') || '');
if (permissionArr.indexOf('14') < 0) {
message.error('No Permissions!!!', 3);
return;
}
confirm({
title: 'Do you Want to delete these items?',
icon: <ExclamationCircleOutlined />,
......
......@@ -55,7 +55,7 @@ const ServiceProviderManagement = (props: propsType) => {
};
const goToDetail = (values: valuesType, e: any) => {
if (permissionArr.indexOf('6') < 0) {
if (permissionArr.indexOf('9') < 0) {
message.error('No Permissions!!!', 3);
return;
}
......@@ -70,7 +70,7 @@ const ServiceProviderManagement = (props: propsType) => {
};
const goToEdit = (values: object, e: any) => {
if (permissionArr.indexOf('7') < 0) {
if (permissionArr.indexOf('10') < 0) {
message.error('No Permissions!!!', 3);
return;
}
......@@ -79,7 +79,7 @@ const ServiceProviderManagement = (props: propsType) => {
};
const goToCreate = () => {
if (permissionArr.indexOf('8') < 0) {
if (permissionArr.indexOf('11') < 0) {
message.error('No Permissions!!!', 3);
return;
}
......
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