Commit b6c63568 authored by maple's avatar maple

[new]新增小区服务

parent aa62b187
......@@ -61,6 +61,10 @@ export default defineConfig({
component: '../layouts/BasicLayout',
authority: ['admin', 'user'],
routes: [
{
path: '/500',
component:'./500'
},
{
path: '/',
redirect: '/runTest',
......@@ -146,7 +150,11 @@ export default defineConfig({
{
path: './ShelfLifeService',
name: 'shelflifeservice',
component:'./CommercialService/PropertyServices'
routes: [
{ path: './', component: './CommercialService/PropertyServices' },
{ path: './Detail', component: './CommercialService/Detail' },
{path: './Edit',component:'./CommercialService/Detail'},
]
},
{path: './AccessCardApplication/Request',component:'./CommercialService/AccessCardApplication/Request'},
{path: './OwnerComplaints/Detail',component:'./CommercialService/Detail'},
......@@ -157,7 +165,6 @@ export default defineConfig({
{path: './RenovationApplication/Edit',component:'./CommercialService/Detail'},
{path: './ReportOnline/Detail',component:'./CommercialService/Detail'},
{path: './ReportOnline/Edit',component:'./CommercialService/Detail'},
]
},
{
......
......@@ -67,30 +67,50 @@ class SelectOptions extends React.Component {
};
constructor(props) {
super(props);
const {list, dispatch } = this.props;
const {list, dispatch,checklist} = this.props;
if(list==null){
//console.error("组件错误:没有数据导入")
}
this.state = {
selectoptionsOpen : 'Open',
selectoptionsPutItAway :'Put It Away',
selectoptionsSelected : 'Selected',
selectoptionsSelectNone : 'Select None',
selectoptionsAll:'All',
selectoptionsSearchCell :'Search cell',
menuList:ArrayToPingYin.get(list),
componetVisible:'Open',
checkedListOptions:list,
checkedList: list,
indeterminate: false,
checkAll: true,
checkNone: false,
resultList:list,
};
}
if(checklist==null){
this.state = {
selectoptionsOpen : 'Open',
selectoptionsPutItAway :'Put It Away',
selectoptionsSelected : 'Selected',
selectoptionsSelectNone : 'Select None',
selectoptionsAll:'All',
selectoptionsSearchCell :'Search cell',
menuList:ArrayToPingYin.get(list),
componetVisible:'Open',
checkedListOptions:list,
checkedList: list,
indeterminate: false,
checkAll: true,
checkNone: false,
resultList:list,
};
}else{
console.log(checklist)
this.state = {
selectoptionsOpen : 'Open',
selectoptionsPutItAway :'Put It Away',
selectoptionsSelected : 'Selected',
selectoptionsSelectNone : 'Select None',
selectoptionsAll:'All',
selectoptionsSearchCell :'Search cell',
menuList:ArrayToPingYin.get(list),
componetVisible:'Open',
checkedListOptions:list,
checkedList: checklist,
indeterminate: false,
checkAll: true,
checkNone: false,
resultList:checklist,
};
}
}
hideAndexpand = ()=> {
if(this.state.componetVisible==this.state.selectoptionsOpen){
......@@ -177,20 +197,23 @@ class SelectOptions extends React.Component {
render() {
return (
<div style={{minWidth:800}}>
<div style={{minWidth:800,marginBottom:16}}>
{
this.state.componetVisible==this.state.selectoptionsOpen?
<>
<div style={{width:"100%",height:48, position:"relative"}}>
<div style={{ position:"absolute",left:5,top:5}}>{this.state.selectoptionsSelected}{this.state.resultList.length==this.props.list.length?this.state.selectoptionsAllCell:getDotText(this.state.resultList)}</div>
<div style={{ position:"absolute",right:16,top:5,cursor:"pointer"}} onClick={()=>this.hideAndexpand()}>{this.state.componetVisible}<DownOutlined /></div>
<div style={{ position:"absolute",left:5,top:5}}>{this.state.selectoptionsSelected}{this.state.resultList.length==this.props.list.length?this.state.selectoptionsAllCell:null}</div>
<div style={{ position:"absolute",right:16,top:5,cursor:"pointer"}} onClick={()=>this.hideAndexpand()}>{this.state.componetVisible}<DownOutlined /></div>
</div>
<div style={{padding:5}}>{this.state.resultList.length==this.props.list.length?null:getDotText(this.state.resultList)}</div>
</>
:
<div style={{width:"100%",backgroundColor:"#eeeeee"}}>
<div style={{width:"100%",height:48, position:"relative"}}>
<div style={{ position:"absolute",left:5,top:5}}>{this.state.resultList.length==0?this.state.selectoptionsSelectNone:this.state.selectoptionsSelected}{this.state.resultList.length==this.props.list.length?this.state.selectoptionsAllCell:getDotText(this.state.resultList)}</div>
<div style={{ position:"absolute",left:5,top:5}}>{this.state.resultList.length==0?this.state.selectoptionsSelectNone:this.state.selectoptionsSelected}{this.state.resultList.length==this.props.list.length?this.state.selectoptionsAllCell:null}</div>
<div style={{ position:"absolute",right:16,top:5,cursor:"pointer"}} onClick={()=>this.hideAndexpand()}>{this.state.componetVisible} <UpOutlined /></div>
</div>
<div style={{padding:5}}>{this.state.resultList.length==this.props.list.length?null:getDotText(this.state.resultList)}</div>
<div style={{width:"100%",backgroundColor:"#eeeeee",userSelect:"none"}}>
<div style={{width:"100%",height:40, position:"relative"}}>
<div style={{fontSize:14,position:"absolute"}}>
......@@ -224,7 +247,7 @@ class SelectOptions extends React.Component {
</div>
</div>
}
</div>
);
}
......
import React from 'react';
import styles from './index.less';
import BackButton from '../BackButton/BackButton';
import TitleGet from '../TitleGet/TitleGet';
import { Input, Row, Col, Form, Select, Button } from 'antd';
const { Option } = Select;
// const key = ['A', 'C']
// const status = [{name:"status",data:["处理", "未处理"]}]
const TitleSearch= (props:any) => {
const key = props.listkey
const name = props.list;
const status = props.status;
const onFinish = values => {
console.log('Success:', values);
props.onSubmit(values)
};
const onFinishFailed = errorInfo => {
console.log('Failed:', errorInfo);
};
return (
<>
<Form name="basic" onFinish={onFinish} onFinishFailed={onFinishFailed}>
<Row gutter={32}>
{
key!=null?
key.map((item, index) => {
return (
<Col key={"KeyCol_"+ index}><Form.Item name={item}><Input placeholder={name[index]} /></Form.Item></Col>
)
})
:null
}
{
status != null ?
status.map((item, index) => {
return (
<Col key={"StatusCol_" + index}><Form.Item name={item.name}>
<Select style={{width:160}}>
<Option value="none"> </Option>
{
item.data.map(word => {
return (
<Option key={word} value="word">{word}</Option>
)
})
}
</Select></Form.Item></Col>
)
})
:null
}
<Col><Form.Item><Button type="primary" htmlType="submit">Search</Button></Form.Item></Col>
</Row>
</Form>
</>
);
};
export default TitleSearch;
//头部组件
.item0{
float: left;
}
.item1{
float: left;
margin-left: 16px;
line-height: 34px;
}
.item2{
float: right;
}
.clear{
clear: both;
}
.clear0{
.clear();
margin-bottom: 35px;
}
......@@ -24,6 +24,7 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout
isReady: true,
});
const { dispatch } = this.props;
console.log("登录中")
if (dispatch) {
dispatch({
type: 'user/fetchCurrent',
......@@ -38,8 +39,8 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout
// 你可以把它替换成你自己的登录认证规则(比如判断 token 是否存在)
const isLogin = currentUser && currentUser.userid;//isLogin为关键点
const queryString = stringify({
redirect: window.location.href,
});
......
import * as service from '../services/tos';
import { message } from 'antd';
import { routerRedux } from 'dva/router'
export default {
namespace: 'AccountManagement',
state: {
Data: null,
CurData:'',
},
reducers: {
returnData(state, { Data }) {
return { ...state, Data };
},
},
effects: {
//获取管理列表
*TosUserGetAllInfrom({ playload }, { call, put }) {
console.log(playload)
const resp = yield call(service.TosUserGetAllInfrom, playload);
console.log(resp)
let Data = resp.data.rows;
yield put({ type: 'returnData', Data, });
},
},
};
// 'count', 'createTime',
// 'deleted', 'description',
// 'extend', 'id',
// 'tosUserEmail', 'tosUserId',
// 'tosUserName', 'tosUserPhone',
// 'tosUserPwd', 'tosUserServiceCell',
// 'tosUserToCompany', 'tosuserLevel',
// 'updateTime', 'userStatus'
\ No newline at end of file
import * as service from '../services/tos';
import { message } from 'antd';
import { routerRedux } from 'dva/router'
export default {
namespace: 'CommunityService',
state: {
Data: null,
CurData: null,
CurDataDetail:{community:'',address:'',home:'',name:'',phone:'',email:'',content:''},
},
reducers: {
returnPage(state, { Data }) {
return { ...state, Data };
},
returnCurData(state, { CurData }) {
return { ...state, CurData };
},
returnCurDataDetail(state, { CurDataDetail }) {
return { ...state, CurDataDetail };
},
},
effects: {
// 获取社区服务
*TosCommunityServiceGet({ playload }, { call, put }) {
const resp = yield call(service.TosCommunityServiceGet, playload);
console.log(resp)
if (resp.code == 500) {
window.location.href = '/500';
} else {
let Data = resp.data.rows;
yield put({ type: 'returnPage', Data, });
}
},
*TosCommuntiyServiceReply({ playload }, { call, put }) {
const resp = yield call(service.TosCommuntiyServiceReply, playload);
console.log(resp)
if (resp.code == 500) {
window.location.href = '/500';
} else {
//window.location.href = '/CommercialService/OwnerComplaints';
}
},
*TosCommunityServiceGetDetail({ playload }, { call, put }) {
const resp = yield call(service.TosCommunityServiceGetDetail, playload);
console.log(resp)
if (resp.code == 500) {
window.location.href = '/500';
} else {
var tmp = resp.data.rows[0].tosOwerModel;
var tmp2 = resp.data.rows[0].description;
var CurDataDetail = {
community: tmp.communityName,
address: tmp.addressAndpostalCode,
home: tmp.buildingNumber+"#"+tmp.floorNumber+"-"+tmp.roomNumber,
name: tmp.owerName,
phone: tmp.owerPhone,
email: tmp.owerEmail,
content: tmp2,
};
yield put({ type: 'returnCurDataDetail', CurDataDetail, });
}
},
*setCurData({ playload }, { call, put }) {
var CurData = playload;
yield put({ type: 'returnCurData', CurData, });
},
*setCurDataDetail({ playload }, { call, put }) {
var CurDataDetail={community:'',address:'',home:'',name:'',phone:'',email:'',content:''}
yield put({ type: 'returnCurDataDetail', CurDataDetail, });
}
},
};
import * as service from '../services/ServiceProviderServices';
import * as service from '../services/tos';
import { message } from 'antd';
import { routerRedux } from 'dva/router'
......@@ -6,79 +6,75 @@ import { routerRedux } from 'dva/router'
export default {
namespace: 'ServiceProvider',
state: {
Data: '',
CurData: '',
CurDataFollow:''
Data: null,
CurDataFollow: null,
SaveChooseData:null,
},
reducers: {
returnPage(state, { Data }) {
return { ...state, Data };
},
returnCurData(state, { CurData }) {
return { ...state, CurData };
},
returnCurDataFollow(state, { CurDataFollow }) {
return { ...state, CurDataFollow };
},
returnCurDataFollowDetail(state, { CurDataFollowDetail }) {
return { ...state, CurDataFollowDetail };
},
returnSaveChooseData(state, { SaveChooseData }) {
return { ...state, SaveChooseData };
},
},
effects: {
//获取服务商
*model_1001({playload}, { call, put }){
const resp = yield call(service.service_1001, playload);
console.log(resp)
let Data = resp;
yield put({ type: 'returnPage', Data, });
},
//获取服务商根据ID
*model_1002({playload}, { call, put }){
const resp = yield call(service.service_1002, playload);
console.log(resp)
let CurData = resp;
yield put({ type: 'returnCurData', CurData, });
},
//创建服务商
*model_1003({playload}, { call, put }){
const resp = yield call(service.create, playload);
console.log(resp)
let Data = resp;
message.success("create success!", 2);
yield put(routerRedux.push('/UserManagement/ServiceProviderManagement'));
},
// 获取服务商
*get({playload}, { call, put }){
const resp = yield call(service.get, playload);
*TosTosServiceProviderGet({ playload }, { call, put }) {
const resp = yield call(service.TosTosServiceProviderGet, playload);
console.log(resp)
let Data = resp;
yield put({ type: 'returnPage', Data, });
if (resp.code == 500) {
window.location.href = '/500';
} else {
let Data = resp.data.rows;
yield put({ type: 'returnPage', Data, });
}
},
//获取服务商根据服务名
*getByProviderName({ playload }, { call, put }) {
// 新建服务商
*TosTosServiceProviderSave({ playload }, { call, put }) {
console.log(playload)
const resp = yield call(service.get, playload);
const resp = yield call(service.TosTosServiceProviderSave, playload);
console.log(resp)
let CurData = resp.data.rows[0];
yield put({ type: 'returnCurData', CurData, });
if (resp.code == 500) {
window.location.href = '/500';
} else {
message.success("operator success!", 2);
window.location.href = '/UserManagement/ServiceProviderManagement';
}
},
//获取服务商保安根据服务商名
*getSecurityGuarder({ playload }, { call, put }) {
*TosSecurityGuarderGet({ playload }, { call, put }) {
console.log(playload)
const resp = yield call(service.getSecurityGuarder, playload);
const resp = yield call(service.TosSecurityGuarderGet, playload);
console.log(resp)
let CurDataFollow = resp.data.rows;
yield put({ type: 'returnCurDataFollow', CurDataFollow, });
},
//获取服务商保安详情根据服务商名
*getSecurityGuarderById({ playload }, { call, put }) {
*GuarderById({ playload }, { call, put }) {
let CurDataFollowDetail = playload;
yield put({ type: 'returnCurDataFollowDetail', CurDataFollowDetail, });
},
*SaveChooseData({ playload }, { call, put }) {
let SaveChooseData = playload;
yield put({ type: 'returnSaveChooseData', SaveChooseData, });
},
},
};
......@@ -6,7 +6,7 @@ import { routerRedux } from 'dva/router'
export default {
namespace: 'Init',
state: {
CommunityList: '',
CommunityList: [],
},
reducers: {
......
import { stringify } from 'querystring';
import { history, Reducer, Effect } from 'umi';
import { AccountLogin } from '@/services/login';
import { AccountLogin,AccountCheckLogin } from '@/services/login';
import { setAuthority } from '@/utils/authority';
import { getPageQuery } from '@/utils/utils';
......@@ -9,6 +9,7 @@ export interface StateType {
status?: 'ok' | 'error';
type?: string;
currentAuthority?: 'user' | 'guest' | 'admin';
token?: string;
}
export interface LoginModelType {
......@@ -19,15 +20,31 @@ export interface LoginModelType {
logout: Effect;
};
reducers: {
changeLoginStatus: Reducer<StateType>;
changeLoginStatus: Reducer<StateType>;
};
}
const Model: LoginModelType = {
namespace: 'login',
state: {
status: undefined,
token:'A',
},
reducers: {
changeLoginStatus(state, { payload }) {
setAuthority(payload.currentAuthority);
return {
...state,
status: payload.status,
type: payload.type,
};
},
saveToken(state, { token }) {
return{...state,token}
}
},
effects: {
......@@ -39,6 +56,10 @@ const Model: LoginModelType = {
});
// Login successfully
if (response.status === 'ok') {
console.log("登录成功")
const userMessage = yield call(AccountCheckLogin, payload);//请求时间网络
console.log(userMessage.token)
yield put({type: 'saveToken',token: userMessage.token});
const urlParams = new URL(window.location.href);
const params = getPageQuery();
let { redirect } = params as { redirect: string };
......@@ -72,16 +93,7 @@ const Model: LoginModelType = {
},
},
reducers: {
changeLoginStatus(state, { payload }) {
setAuthority(payload.currentAuthority);
return {
...state,
status: payload.status,
type: payload.type,
};
},
},
};
export default Model;
import { Button, Result } from 'antd';
import React from 'react';
import { history } from 'umi';
const NoFoundPage: React.FC<{}> = () => (
<Result
status="500"
title="500"
subTitle="Sorry,server is wrong,please try again."
extra={
<Button type="primary" onClick={() => history.push('/')}>
Back Home
</Button>
}
/>
);
export default NoFoundPage;
import React, { useState, useEffect,useRef} from 'react';
import styles from './Account.less';
import {Form, Input ,Button,Table,Space} from 'antd';
import {Form, Input ,Button,Table,Space,Row,Col} from 'antd';
import { Link, useIntl, connect, Dispatch,history } from 'umi';
import SelectOptions from '../../../components/SelectOptions/index';
import { timestampToTime } from '../../../utils/time';
const Account = (props: any) => {
const { formatMessage } = useIntl();
const { dispatch, location,Data,CommunityList} = props;
const get = (values:any) => {dispatch({type: 'ServiceProvider/get',playload:values})};
const { dispatch, location,Data} = props;
const get = (values:any) => {dispatch({type: 'AccountManagement/TosUserGetAllInfrom',playload:values})};
useEffect(() => {
get(null)
get({
"id": "",
"moment": [],
"name": "",
"leaderID": "1",
"userPhone": ""
})
}, []);
const formRef = useRef(null);
......@@ -29,17 +36,26 @@ const Account = (props: any) => {
const goToEdit = (values:any,e:any) => {
history.push(location.pathname + '/Edit?providerName='+values.providerName)
}
const goToServices = () => {history.push(location.pathname +'/Services')}
const pagination={defaultCurrent:1,total: 16}
/*
账号名称 tosUserName
等级 tosuserLevel
状态 userStatus
创建者
创建时间 createTime
*/
const columns = [
{ title: "Service Provider",dataIndex: 'providerName',},
{ title: "Contacts",dataIndex: 'contactPhone',},
{ title: "Contact Details",dataIndex: 'contactEmail',},
{ title: "Services Available",dataIndex: 'enable',},
{ title: "Account Status",dataIndex: 'enable',},
{ title: "tosUserName", dataIndex: 'tosUserName', },
{ title: "tosuserLevel", dataIndex: 'tosuserLevel', },
{ title: "userStatus", dataIndex: 'userStatus', },
{title: "createTime",
render: (text: any, record: any) => (
<Space size="middle">{timestampToTime(record.createTime.time)}</Space>
),
},
{ title: "Actions",
render: (text: any, record: any) => (
<Space size="middle"><a onClick={goToDetail.bind(this,record)}>Detail</a><a onClick={goToEdit.bind(this,record)}>edit</a></Space>
......@@ -55,22 +71,20 @@ const Account = (props: any) => {
<div className={styles.base}>
{/* 头部组件 */}
<Form ref={formRef} name="basic" initialValues={{}} onFinish={onFinish} onFinishFailed={onFinishFailed}>
<div className={styles.box}>
<Form.Item name="providerName" ><Input placeholder="Service Provider" /></Form.Item>
<Form.Item name="providerName" ><Input placeholder="Service Provider" /></Form.Item>
</div>
<Row gutter={8}>
<Col ><Form.Item name="username" ><Input placeholder="UserName" /></Form.Item></Col>
<Col ><Form.Item name="creator"><Input placeholder="Creator" /></Form.Item></Col>
<Col ><Form.Item > <Button type="primary" htmlType="submit">Search</Button></Form.Item></Col>
</Row>
</Form>
{/* 内容组件 */}
<div className={styles.box2}>
<Button className={styles.buttonAdd} onClick={goToCreate}>create new</Button>
</div>
{/* 列表组件 */}
<Table size="small" rowKey={"id"} style={{ marginTop: 16 }} columns={columns} dataSource={Data.data!=null?dataSource(Data.data.rows):null} pagination={pagination} />
<Table size="small" rowKey={"id"} style={{ marginTop: 16 }} columns={columns} dataSource={Data!=null?dataSource(Data):null} pagination={pagination} />
</div>
......@@ -78,12 +92,10 @@ const Account = (props: any) => {
};
function mapStateToProps(state:any) {
const { Data } = state.ServiceProvider;
const { CommunityList } = state.Init;
console.log(CommunityList)
const { Data } = state.AccountManagement;
console.log(Data)
return {
Data,
CommunityList
Data,
};
}
......
......@@ -25,7 +25,7 @@ const AccountManagement = () => {
return (
<div className={styles.base}>
{/* 头部组件 */}
{/* 头部组件v1.2 */}
<TitleBack title="Admin Account Adding" />
<div className={styles.box1}>
......
......@@ -113,6 +113,7 @@
height: 80px;
background-color: rgba(244,244,244,1);
overflow-y: auto;
padding: 8px;
}
.box5{
......
import React, { useState, useEffect } from 'react';
import styles from './Detail.less';
import { Input ,Menu,Table,Space,Upload,Modal, Button } from 'antd';
import { Input ,Form,Row,Col,Upload,Modal, Button } from 'antd';
import { Link, useIntl, connect, Dispatch } from 'umi';
import TextArea from 'antd/lib/input/TextArea';
......@@ -9,6 +9,8 @@ import TextArea from 'antd/lib/input/TextArea';
import { PlusOutlined } from '@ant-design/icons';
import TitleBack from '../../components/TitleBack/TitleBack';
function getBase64(file: Blob) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
......@@ -30,7 +32,7 @@ const stylesList8 = [
]
const Detail = (props) => {
const Detail = (props:any) => {
const [picList] = useState(['https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png']);
......@@ -41,12 +43,18 @@ const Detail = (props) => {
const [editorFlag, setEditorFlag] = useState(true);
const { location } = props;
const goToReturn = () => {
history.back()
}
const { dispatch, location, CurData,CurDataDetail } = props;
const TosCommunityServiceGetDetail = (values: any) => { dispatch({ type: 'CommunityService/TosCommunityServiceGetDetail', playload: values }) };
const TosCommuntiyServiceReply = (values: any) => { dispatch({ type: 'CommunityService/TosCommuntiyServiceReply', playload: values }) };
const setCurDataDetail = () => { dispatch({ type: 'CommunityService/setCurDataDetail' }) };
useEffect(() => {
setCurDataDetail()
TosCommunityServiceGetDetail({
serviceType:CurData.service_type,
id:CurData.id
})
},[]);
useEffect(() => {
if ((location.pathname).indexOf("/Edit")>-1) {
......@@ -70,45 +78,58 @@ const Detail = (props) => {
if (!file.url && !file.preview) {
file.preview = await getBase64(file.originFileObj);
}
setPreviewImage((file.url || file.preview));
setPreviewVisible(true);
setPreviewTitle(file.name || file.url.substring(file.url.lastIndexOf('/') + 1));
};
const handleChange = (Obj:any) => {setFileList(Obj.fileList)}
const handleChange = (Obj: any) => {
var tmp = Obj.fileList
console.log(tmp[0])
console.log(tmp[0].thumbUrl)
setFileList(Obj.fileList)
}
const onFinish = values => {
var val = values
val.type =CurData.service_type
val.id =CurData.id
val.userId = CurData.user_id
val.handleStatus = "1"
val.file=["jpg:iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEuSURBVChTbVC/6oJgFP3sDy2CUJAQTeLSYFCWLkJDU+IbWK3iCzS0uYqDS4uT+AqNDYFT0Ngg+ABCW7jb6ffdoOl34XI5h3vvOfcy/BN1XeP5fKJpGsLv9xusKApcr1ecz2fEcYw0TXE4HDAej5HnOcIwpEE2n8/BGPulrutwXRetVgun04k40zTBHo8HkiSBIAjY7XZ4vV44Ho+Eq6oipdlsBmYYBqbTKbrdLobDIZGDwYA2KoqCxWIBTdPAVqsVlsslOp0OVFXFZrPBZDKhjdwGtzYajUBX3+938rLdbnG73X7eLpcL2ZBlGYzLcJJL8cozCAJIkvRt+MP7/R7McRys12sibNsGP46/q9/vE+d5HqIo+kqXZYl2uw3f95FlGURRpKZerwf+Z8uy8AEHrdhGHemyIwAAAABJRU5ErkJggg=="]
console.log('Success:', val)
TosCommuntiyServiceReply(val)
};
const onFinishFailed = errorInfo => {
console.log('Failed:', errorInfo);
};
return (
<div className={styles.base}>
{/* 头部组件 */}
<div className={styles.box}>
<div className={styles.item1}>Payment Settings</div>
<button className={styles.item3} onClick={goToReturn}>返回</button>
</div>
{/* 头部组件v1.2 */}
<TitleBack title="Payment Settings" />
{/* 内容组件 */}
<div className={styles.box1}>
<div className={styles.box1item1}>Sunshine Stanford </div>
<div className={styles.box1item2}>03#06-2050</div>
<div className={styles.box1item1}>{CurDataDetail.community}</div>
<div className={styles.box1item2}>{CurDataDetail.home}</div>
</div>
<div className={styles.box2}>
<div className={styles.box2item1}>Albert Street,175,Singapore,Albert,Bugis,Victoria Street,Rochor,Central Singapore 189969</div>
<div className={styles.box2item1}>{CurDataDetail.address}</div>
</div>
<div className={styles.box3}>
<div className={styles.box3item1}>User Name</div>
<div className={styles.box3item2}>Josephine </div>
<div className={styles.box3item2}>{CurDataDetail.name}</div>
<div className={styles.box3item3}>Contact Details</div>
<div className={styles.box3item4}>13657724536</div>
<div className={styles.box3item5}>371712650@qq.com</div>
<div className={styles.box3item4}>{CurDataDetail.phone}</div>
<div className={styles.box3item5}>{CurDataDetail.email}</div>
</div>
<div className={styles.box4}>
<div className={styles.box4item1}>Warranty Details</div>
<div className={styles.box4item2}>
垃圾分类(英文名为:Garbage classification),一般是指按一定规定或标准将垃圾分类储存、分类投放和分类搬运,从而转变成公共资源的一系列活动的总称。分类的目的是提高垃圾的资源价值和经济价值,力争物尽其用。
垃圾在分类储存阶段属于公众的私有品,垃圾经公众分类投放后成为公众所在小区或社区的区域性准公共资源,垃圾分类搬运到垃圾集中点或转运站后成为没有排除性的公共资源。从国内外各城市对生活垃圾分类的方法来看,大致都是根据垃圾的成分、产生量,结合本地垃圾的资源利用和处理方式来进行分类的。
进行垃圾分类收集可以减少垃圾处理量和处理设备,降低处理成本,减少土地资源的消耗,具有社会、经济、生态等几方面的效益。
</div>
<div className={styles.box4item2}>{CurDataDetail.content}</div>
</div>
<div className={styles.box5}>
<div className={styles.box5item1}>Picture</div>
......@@ -126,17 +147,23 @@ const Detail = (props) => {
<div className={styles.line}></div>
<Form name="basic" onFinish={onFinish} onFinishFailed={onFinishFailed}>
<div className={styles.box6}>
<div className={styles.box6item1}>response</div>
<div className={styles.box6item2}><Input style={{ width: 200 }} placeholder="Please enter a Name" disabled={!editorFlag} /></div>
<div className={styles.box6item2}><Form.Item name="handleName" ><Input style={{ width: 200 }} placeholder="Please enter a Name" disabled={!editorFlag} /></Form.Item></div>
<div className={styles.box6item3}>Contract Detail</div>
<div className={styles.box6item4}><Input style={{ width: 300 }} placeholder="Please enter contrat number" disabled={!editorFlag} /></div>
<div className={styles.box6item4}><Form.Item name="handleContacts" ><Input style={{ width: 300 }} placeholder="Please enter contrat number" disabled={!editorFlag} /></Form.Item></div>
</div>
<div className={styles.box7}>
<div className={styles.box7item1}>Resolved Complaint</div>
<div className={styles.box7item2}><TextArea style={{ width: 394, height: 80 }} autoSize={false} disabled={!editorFlag}/></div>
<div className={styles.box7item2}><Form.Item name="replyContent" ><TextArea style={{ width: 394, height: 80 }} autoSize={false} disabled={!editorFlag}/></Form.Item></div>
</div>
<div className={fileList.length !=0?styles.box8:styles.box8min}>
......@@ -145,7 +172,7 @@ const Detail = (props) => {
{
editorFlag ?
(<div>
<Upload action="https://www.mocky.io/v2/5cc8019d300000980a055e76" listType="picture-card" fileList={fileList} onPreview={handlePreview} onChange={handleChange}>
<Upload action="" listType="picture-card" fileList={fileList} onPreview={handlePreview} onChange={handleChange}>
{fileList.length >= 3 ? null : uploadButton}
</Upload>
<Modal visible={previewVisible} title={previewTitle} footer={null} onCancel={handleCancel}>
......@@ -164,16 +191,25 @@ const Detail = (props) => {
}
</div>)
}</div>
</div>
</div>
{
editorFlag ?
(<div><div className={styles.line}></div><Button type="primary">summit</Button></div>):(<div/>)
}
(<div><div className={styles.line}></div><Form.Item><Button type="primary" htmlType="submit">summit</Button></Form.Item></div>):(<div/>)
}
</Form>
</div>
);
};
export default Detail;
function mapStateToProps(state:any) {
const { CurData, CurDataDetail } = state.CommunityService;
// console.log(CurDataDetail)
return {
CurData,
CurDataDetail
};
}
export default connect(mapStateToProps)(Detail);
......@@ -4,99 +4,99 @@ import { Input ,Menu,Table,Space,Upload,message,Button } from 'antd';
import { Link, useIntl, connect, Dispatch,history } from 'umi';
import { timestampToTime3 } from '../../utils/time';
const pagination={defaultCurrent:1,total: 16}
const dataSource = [
{
key: '1',
name: '胡彦斌',
age: 32,
address: '西湖区湖底公园1号',
},
{
key: '1',
name: '胡彦斌',
age: 33,
address: '西湖区湖底公园1号',
},
];
import TitleSearch from '../../components/TitleSearch/TitleSearch';
const PropertyServices = (props: { location: any; }) => {
const PropertyServices = (props: any) => {
const { formatMessage } = useIntl();
const nameofowner = formatMessage({ id: 'R.charge.input.nameofowner' })
const inputProject = formatMessage({ id: 'R.charge.input.project' })
const username = formatMessage({ id: 'R.charge.username' })
const project = formatMessage({ id: 'R.charge.project' })
const unit = formatMessage({ id: 'R.charge.unit' })
const status = formatMessage({ id: 'R.charge.status' })
const submissionTime = formatMessage({ id: 'R.charge.submissionTime' })
const actions = formatMessage({ id: 'R.charge.actions' })
const search = formatMessage({ id: 'R.charge.search' })
const addaccount = formatMessage({ id: 'R.charge.addaccount' })
const paymentsetting = formatMessage({ id: 'R.charge.paymentsetting' })
const { location } = props;
const { dispatch, location, Data } = props;
const TosCommunityServiceGet = (values: any) => { dispatch({ type: 'CommunityService/TosCommunityServiceGet', playload: values }) };
const setCurData = (values: any) => { dispatch({ type: 'CommunityService/setCurData', playload: values }) };
const pagination = { defaultCurrent: 1, total: Data!=null?Data.length:0 }
const goToFunction = (value, e) => {
history.push(location.pathname+(value==33?"/Edit":"/Detail"))
const goToFunction = (value, record, e) => {
console.log(record)
setCurData(record)
history.push(location.pathname+(value==0?"/Edit":"/Detail"))
}
const goToRequest = () => {
history.push("./AccessCardApplication/Request")
}
const tags = [username, project, unit, submissionTime, status,actions];
const [columns, setColums] = useState([{title:"1", dataIndex:"1", key:"1"}]);
useEffect(() => {
var tagval;
if (location.pathname=="/CommercialService/RenovationApplication") {
tagval=['name', 'age', 'address', 'address', 'address'];
} else {
tagval=['name', 'age', 'age', 'age', 'address'];
}
var columnsTmp = [
{ title: tags[0], dataIndex: tagval[0], key: tagval[0] },
{ title: tags[1], dataIndex: tagval[1], key: tagval[1] },
{ title: tags[2], dataIndex: tagval[2], key: tagval[2] },
{ title: tags[3], dataIndex: tagval[3], key: tagval[3] },
{ title: tags[4], dataIndex: tagval[4], key: tagval[4] },
{ title: tags[5], dataIndex: tagval[3], key: tagval[3],
render: (text: any, record: any) => (
<Space size="middle">
<a onClick={goToFunction.bind(this,text)}>{text==33?"回复":"详情"}</a>
</Space>
),},];
setColums(columnsTmp)
},[location.pathname]);
const columns = [
{ title: "community_name",dataIndex: 'community_name',},
{ title: "ower_name",dataIndex: 'ower_name',},
{ title: "service_content",dataIndex: 'service_content',},
{ title: "create_time",dataIndex: "create_time",
render: (text: any, record: any) => (
<Space size="middle">{timestampToTime3(text.time)}</Space>
),
},
{
title: "handle_status", dataIndex: 'handle_status',
render: (text: any, record: any) => (
<Space size="middle">{text==0?"Untreated":"Processed"}</Space>
),
},
{ title: "Actions",dataIndex: 'handle_status',
render: (text: any, record: any) => (
<Space size="middle"> <a onClick={goToFunction.bind(this,text,record)}>{text==0?"Reply":"Detail"}</a></Space>
),
},
];
useEffect(() => {
var init="1"
if (location.pathname == "/CommercialService/RenovationApplication") { init = "1"}
else if(location.pathname == "/CommercialService/ShelfLifeService") {init = "2"}
else if (location.pathname == "/CommercialService/OwnerComplaints") { init = "3" }
else if (location.pathname == "/CommercialService/ReportOnline") { init = "4" }
else if(location.pathname == "/CommercialService/ProblemFeedback") {init = "5"}
TosCommunityServiceGet({serviceType:init})
},[]);
const printContent = (comment: any)=>{
console.log(comment)
}
return (
<div className={styles.base}>
{/* 头部组件 */}
<div className={styles.box}>
<input className={styles.item1} placeholder={nameofowner} />
<input className={styles.item2} placeholder={inputProject} />
<input className={styles.item4} placeholder={inputProject} />
<button className={styles.item3}>{search}</button>
</div>
<div style={{position:"relative", width: "100%", height: 40 }}>
<TitleSearch listkey={['A', 'C']} list={['Hello', 'world']} status={[{ name: "status", data: ["处理", "未处理"] }]} onSubmit={printContent}/>
{/* <div style={{position:"relative", width: "100%", height: 40 }}>
<div style={{ position: "absolute", right: 0 }}>
{
location.pathname == "/CommercialService/AccessCardApplication"?(<Button type="primary" size="large" onClick={goToRequest}>Apply For Access Card</Button>):(<div/>)
}
</div>
</div>
</div> */}
{/* 列表组件 */}
<Table style={{ marginTop: 16 }} dataSource={dataSource} columns={columns} pagination={pagination} />
<Table rowKey={"id"} style={{ marginTop: 16 }} dataSource={Data} columns={columns} pagination={pagination} />
</div>
);
};
export default PropertyServices;
function mapStateToProps(state:any) {
const { Data } = state.CommunityService;
return {
Data
};
}
export default connect(mapStateToProps)(PropertyServices);
......@@ -9,6 +9,7 @@ import { Link, useIntl, connect, Dispatch, history } from 'umi';
import { timestampToTime } from '../../utils/time';
import { values } from 'lodash';
import TitleSearch from '../../components/TitleSearch/TitleSearch';
const ChargeManager = (props:any) => {
const { formatMessage } = useIntl();
const { dispatch, location, Data } = props;
......@@ -65,15 +66,13 @@ const ChargeManager = (props:any) => {
),
},
];
const TitleSearchContent = (comment: any)=>{
console.log(comment)
}
return (
<div className={styles.base}>
{/* 头部组件 */}
<div className={styles.box}>
<input className={styles.item1} placeholder={nameofowner} />
<input className={styles.item2} placeholder={inputProject} />
<button className={styles.item3}>{search}</button>
</div>
<TitleSearch listkey={['tosOwnerName', 'communityName']} list={['tosOwnerName', 'communityName']} onSubmit={TitleSearchContent}/>
{/* 内容组件 */}
<div className={styles.box2}>
......
......@@ -7,35 +7,31 @@ import { Link, useIntl, connect, Dispatch,history } from 'umi';
import ShowOptions from '../../../components/ShowOptions/index';
import TitleBack from '../../../components/TitleBack/TitleBack';
const Detail = (props:any) => {
const { dispatch, Data, CurData,CurDataFollow,location } = props;
const { dispatch, Data,CurDataFollow,location,SaveChooseData } = props;
const getByProviderName = (values: any) => { dispatch({ type: 'ServiceProvider/getByProviderName', playload: values }) };
const getSecurityGuarder = (values: any) => { dispatch({ type: 'ServiceProvider/getSecurityGuarder', playload: values }) };
const getSecurityGuarderById = (values: any) => { dispatch({ type: 'ServiceProvider/getSecurityGuarderById', playload: values }) };
const TosSecurityGuarderGet = (values: any) => { dispatch({ type: 'ServiceProvider/TosSecurityGuarderGet', playload: values }) };
const GuarderById = (values: any) => { dispatch({ type: 'ServiceProvider/GuarderById', playload: values }) };
useEffect(() => {
getByProviderName(location.query)
getSecurityGuarder({companyName:location.query.providerName})
TosSecurityGuarderGet({companyName:SaveChooseData.providerName})
}, []);
const [showList,setShowList]=useState([])
useEffect(() => {
console.log("详情接收")
console.log(CurData)
console.log(CurDataFollow)
}, [CurData,CurDataFollow]);
}, [CurDataFollow]);
const goToGuard = (values: any, e: any) => {
getSecurityGuarderById(values)
GuarderById(values)
history.push(location.pathname +'/Guard?saferName='+values.saferName)
}
const pagination={defaultCurrent:1,total: 16}
const pagination={defaultCurrent:1,total: CurDataFollow!=null?CurDataFollow.length:CurDataFollow}
......@@ -44,7 +40,6 @@ const Detail = (props:any) => {
}
const columns = [
{ title: "User Name",dataIndex: 'saferName',},
{ title: "Service Community", dataIndex: 'projectName', },
......@@ -68,26 +63,26 @@ const Detail = (props:any) => {
<div className={styles.bigbox}>
<div className={styles.box0}>
<div className={styles.box0item1}></div>
<div className={styles.box0item2}>{CurData.serviceCommunityList}</div>
<div className={styles.box0item2}>{SaveChooseData.serviceCommunityList}</div>
</div>
<div className={styles.box1}>
<div className={styles.box1item1}>Company Name</div>
<div className={styles.box1item2}>{CurData.providerName}</div>
<div className={styles.box1item2}>{SaveChooseData.providerName}</div>
</div>
<div className={styles.box2}>
<div className={styles.box2item1}>Office Address</div>
<div className={styles.box2item2}>{CurData.providerAddress}</div>
<div className={styles.box2item2}>{SaveChooseData.providerAddress}</div>
</div>
<div className={styles.box3}>
<div className={styles.box3item1}>Person In Charge</div>
<div className={styles.box3item2}>{CurData.contactName}</div>
<div className={styles.box3item2}>{SaveChooseData.contactName}</div>
</div>
<div className={styles.box4}>
<div className={styles.box4item1}>Contact Details</div>
<div className={styles.box4item2}>{CurData.contactPhone} {CurData.contactEmail}</div>
<div className={styles.box4item2}>{SaveChooseData.contactPhone} {SaveChooseData.contactEmail}</div>
</div>
<div className={styles.box5}>
......@@ -99,9 +94,9 @@ const Detail = (props:any) => {
<div className={styles.box1item1}>Service Community</div>
</div>
{
CurData.serviceCommunityList != null
SaveChooseData.serviceCommunityList != null
?
<ShowOptions list={CurData.serviceCommunityList} defaultValue={"Put It Away"} onSubmit={printContent} />
<ShowOptions list={SaveChooseData.serviceCommunityList} defaultValue={"Put It Away"} onSubmit={printContent} />
:<></>
}
......@@ -118,11 +113,11 @@ const Detail = (props:any) => {
};
function mapStateToProps(state:any) {
const { Data,CurData,CurDataFollow } = state.ServiceProvider;
const { Data,CurDataFollow,SaveChooseData } = state.ServiceProvider;
return {
Data,
CurData,
CurDataFollow,
SaveChooseData
};
}
export default connect(mapStateToProps)(Detail);
\ No newline at end of file
......@@ -5,48 +5,43 @@ import { Input ,Button,Form,Result,Pagination,Tooltip, Checkbox } from 'antd';
import { Link, useIntl, connect } from 'umi';
import SelectOptions from '../../../components/SelectOptions/index';
import TitleBack from '../../../components/TitleBack/TitleBack';
const Edit= (props:any) => {
const { dispatch,CurData,location,CommunityList} = props;
const getByProviderName = (values: any) => { dispatch({ type: 'ServiceProvider/getByProviderName', playload: values }) };
const req_1001 = (values:any) => {dispatch({type: 'ServiceProvider/model_1003',playload:values}) };
const [createFlag, setCreateFlag] = useState(true);
const { dispatch,CurData,SaveChooseData,location,CommunityList} = props;
const TosTosServiceProviderSave = (values: any) => { dispatch({ type: 'ServiceProvider/TosTosServiceProviderSave', playload: values }) };
const [CList, setCList] = useState(CommunityList);
const [SList,setSList]=useState(["1"])
const printContent = (List: any)=>{setCList(List)}
const formRef = useRef(null);
useEffect(() => {
if (location.query.providerName != null) {
setCreateFlag(false)
getByProviderName({providerName:location.query.providerName})
console.log(SaveChooseData)
if (SaveChooseData != null) {
formRef.current.setFieldsValue(SaveChooseData)
}
}, []);
useEffect(() => {
if(createFlag == false){
formRef.current.setFieldsValue(CurData)
}
}, [CurData]);
const onFinish = (values: any) => {
var val = values
val.serviceCommunityList = CList
val.serviceScopeList = SList
val.creator = "admin";
val.updater = "admin";
const goToReturn = () => {history.back()}
const printContent = (comment: any)=>{console.log(comment)}
const onFinish = (values: any) => {req_1001(values)};
TosTosServiceProviderSave(val)
};
const onFinishFailed = (errorInfo:any) => {console.log('Failed:', errorInfo) };
return (
<div className={styles.base}>
{/* 头部组件 */}
<div className={styles.box}>
<div className={styles.item1}>Edit Service Provider</div>
<button className={styles.item3} onClick={goToReturn}>返回</button>
</div>
{/* 头部组件v1.2 */}
<TitleBack title="Edit Service Provider" />
<Form ref={formRef} name="basic" initialValues={{}} onFinish={onFinish} onFinishFailed={onFinishFailed}>
<div className={styles.box1}>
<div className={styles.box1item1}>Company Name</div>
......@@ -57,7 +52,7 @@ const Edit= (props:any) => {
<div className={styles.line}></div>
<SelectOptions list={CommunityList} onSubmit={printContent} />
<SelectOptions list={CommunityList.sort()} checklist={SaveChooseData!=null?SaveChooseData.serviceCommunityList:null} onSubmit={printContent} />
<div className={styles.box2}>
<div className={styles.box2item1}>Services Available</div>
......@@ -87,10 +82,11 @@ const Edit= (props:any) => {
};
function mapStateToProps(state:any) {
const { CurData } = state.ServiceProvider;
const { CurData,SaveChooseData } = state.ServiceProvider;
const { CommunityList } = state.Init;
return {
CurData,
SaveChooseData,
CommunityList
};
}
......
import React, { useState, useEffect,useRef} from 'react';
import styles from './index.less';
import {Form, Input ,Menu,Table,Space} from 'antd';
import {Form, Input ,Spin,Table,Space, Button} from 'antd';
import { LoadingOutlined } from '@ant-design/icons';
const antIcon = <LoadingOutlined style={{ fontSize: 24 }} spin />;
import { Link, useIntl, connect, Dispatch,history } from 'umi';
import SelectOptions from '../../../components/SelectOptions/index';
const ServiceProviderManagement = (props: any) => {
const { formatMessage } = useIntl();
const { dispatch, location,Data,CommunityList} = props;
const get = (values:any) => {dispatch({type: 'ServiceProvider/get',playload:values})};
const TosTosServiceProviderGet = (values: any) => { dispatch({ type: 'ServiceProvider/TosTosServiceProviderGet', playload: values }) };
const SaveChooseData = (values: any) => { dispatch({ type: 'ServiceProvider/SaveChooseData', playload: values }) };
useEffect(() => {
get(null)
TosTosServiceProviderGet(null)
}, []);
const formRef = useRef(null);
const onFinish = (values: any) => {get(values)};
const onFinish = (values: any) => {TosTosServiceProviderGet(values)};
const onFinishFailed = (errorInfo: any) => { console.log('Failed:', errorInfo) };
const goToDetail = (values:any,e:any) => {
history.push(location.pathname +'/Detail?providerName='+values.providerName)
const goToDetail = (values: any, e: any) => {
SaveChooseData(values)
history.push(location.pathname +'/Detail')
}
const goToCreate = () => {
const goToCreate = () => {
SaveChooseData(null)
history.push(location.pathname + '/Edit')
}
const goToEdit = (values:any,e:any) => {
history.push(location.pathname + '/Edit?providerName='+values.providerName)
const goToEdit = (values: any, e: any) => {
SaveChooseData(values)
history.push(location.pathname + '/Edit')
}
const goToServices = () => {history.push(location.pathname +'/Services')}
const pagination={defaultCurrent:1,total: 16}
const pagination={defaultCurrent:1,total: Data!=null?Data.length:0}
const columns = [
{ title: "Service Provider",dataIndex: 'providerName',},
......@@ -64,14 +71,15 @@ const ServiceProviderManagement = (props: any) => {
const printContent = (comment: any)=>{
console.log(comment)
}
const test=['A','B']
return (
<div className={styles.base}>
{/* 头部组件 */}
<Form ref={formRef} name="basic" initialValues={{}} onFinish={onFinish} onFinishFailed={onFinishFailed}>
<div className={styles.box}><Form.Item name="providerName" ><Input style={{width:200}} placeholder="Service Provider" /></Form.Item></div>
<SelectOptions list={CommunityList} onSubmit={printContent}/>
<Form.Item><button className={styles.item3}>Search</button></Form.Item>
<Form.Item><Button type="primary" htmlType="submit">Search</Button></Form.Item>
</Form>
{/* 内容组件 */}
<div className={styles.box2}>
......@@ -80,17 +88,18 @@ const ServiceProviderManagement = (props: any) => {
</div>
{/* 列表组件 */}
<Table size="small" rowKey={"id"} style={{ marginTop: 16 }} columns={columns} dataSource={Data.data!=null?dataSource(Data.data.rows):null} pagination={pagination} />
<Spin spinning={Data!=null?false:true}>
<Table size="small" rowKey={"id"} style={{ marginTop: 16 }} columns={columns} dataSource={Data!=null?dataSource(Data):null} pagination={pagination} />
</Spin>
</div>
</div>
);
};
function mapStateToProps(state:any) {
const { Data } = state.ServiceProvider;
const { CommunityList } = state.Init;
console.log(CommunityList)
return {
Data,
CommunityList
......
......@@ -3,8 +3,10 @@
//基石
.base {
width: 100%;
min-width: 980px;
background-color: #ffffff;
padding: 34px;
overflow: auto;
}
//边栏1
......
......@@ -10,7 +10,7 @@ import TitleGet from '../../components/TitleGet/TitleGet';
const Guard = (props:any) => {
const { dispatch, CommunityList } = props;
const { dispatch, CommunityList,token} = props;
const tosCommunityget = (values:any) => {dispatch({type: 'Init/tosCommunityget',playload:values})};
useEffect(() => {
tosCommunityget(null)
......@@ -21,11 +21,10 @@ const Guard = (props:any) => {
<div className={styles.base}>
<div className={styles.item0}><TitleGet title={"This is a test"}/></div>
<h1>{CommunityList}</h1>
<div className={styles.item0}><TitleGet title={"Welcome"}/></div>
<div>{token}</div>
<Line />
<Button>Cancellation</Button>
</div>
......@@ -34,8 +33,10 @@ const Guard = (props:any) => {
function mapStateToProps(state:any) {
const { CommunityList } = state.Init;
const { token } = state.login;
return {
CommunityList
CommunityList,
token
};
}
......
......@@ -3,8 +3,6 @@ import request from '@/utils/request';
export interface LoginParamsType {
userName: string;
password: string;
mobile: string;
captcha: string;
}
export async function fakeAccountLogin(params: LoginParamsType) {
......@@ -19,8 +17,15 @@ export async function getFakeCaptcha(mobile: string) {
}
export async function AccountLogin(params: LoginParamsType) {
return request('/tos/user/login', {
method: 'POST',
data: params,
});
return request('/tos/user/login', { method: 'POST', data: params, });
}
export interface LoginCheckParamsType {
userName: string;
password: string;
userLevel: string;
userId: string;
}
export async function AccountCheckLogin(params: LoginCheckParamsType) {
return request('/tos/user/newCurrentUser', { method: 'POST', data: params, });
}
\ No newline at end of file
import request from '@/utils/request';
// 后台账号管理
export function TosUsersSave(values: any) {
return request('/tos/users/save',{method: 'POST',body: JSON.stringify(values),headers:{ 'Content-Type': 'application/json'}})
}
export function TosAccountPermissionSavePermission(values: any) {
return request('/tos/account/permission/savePermission',{method: 'POST',body: JSON.stringify(values),headers:{ 'Content-Type': 'application/json'}})
}
export function TosUserGetAllInfrom(values: any) {
return request('/tos/user/getAllInfrom',{method: 'POST',body: JSON.stringify(values),headers:{ 'Content-Type': 'application/json'}})
}
export function TosUsersQuitAndUser(values: any) {
return request('/tos/users/quitAndUser',{method: 'POST',body: JSON.stringify(values),headers:{ 'Content-Type': 'application/json'}})
}
export function TosUserLogin(values: any) {
return request('/tos/user/login/',{method: 'POST',body: JSON.stringify(values),headers:{ 'Content-Type': 'application/json'}})
}
export function TosUserNewCurrentUser(values: any) {
return request('/tos/user/newCurrentUser',{method: 'POST',body: JSON.stringify(values),headers:{ 'Content-Type': 'application/json'}})
}
export function TosCheckAccountUsername(values: any) {
return request('/tos/checkAccount/username',{method: 'POST',body: JSON.stringify(values),headers:{ 'Content-Type': 'application/json'}})
}
export function TosAccountPermissionCheckPermission(values: any) {
return request('/tos/account/permission/checkPermission',{method: 'POST',body: JSON.stringify(values),headers:{ 'Content-Type': 'application/json'}})
}
// 服务商
export function TosTosServiceProviderGet(values: any) {
return request('/tos/tosServiceProvider/get',{method: 'POST',body: JSON.stringify(values),headers:{ 'Content-Type': 'application/json'}})
}
export function TosSecurityGuarderGet(values: any) {
return request('/tos/securityGuarder/get',{method: 'POST',body: JSON.stringify(values),headers:{ 'Content-Type': 'application/json'}})
}
export function TosTosServiceProviderSave(values: any) {
return request('/tos/tosServiceProvider/save',{method: 'POST',body: JSON.stringify(values),headers:{ 'Content-Type': 'application/json'}})
}
//小区服务
export function TosCommunityServiceGet(values: any) {
return request('/tos/community/service/get',{method: 'POST',body: JSON.stringify(values),headers:{ 'Content-Type': 'application/json'}})
}
export function TosCommunityServiceGetDetail(values: any) {
return request('/tos/community/service/get/detail',{method: 'POST',body: JSON.stringify(values),headers:{ 'Content-Type': 'application/json'}})
}
export function TosCommuntiyServiceReply(values: any) {
return request('/tos/communtiy/service/reply',{method: 'POST',body: JSON.stringify(values),headers:{ 'Content-Type': 'application/json'}})
}
\ No newline at end of file
......@@ -11,3 +11,5 @@ export async function queryCurrent(): Promise<any> {
export async function queryNotices(): Promise<any> {
return request('/api/notices');
}
......@@ -9,4 +9,19 @@ export const timestampToTime2=(timestamp:any)=>{
var date = new Date(timestamp);//*1000//getHours getMinutes getSeconds
return date.getFullYear()+'/' + (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + ' '+date.getDate()+' '+date.getHours()+':'+date.getMinutes()+':'+date.getSeconds()
}
function addTZero(time) {
let tmp = time + 1 < 10 ? '0' + time : time + 1
return tmp
}
function addZero(time) {
let tmp = time + 1 < 10 ? '0' + time : time
return tmp
}
// 03-06 13:26
export const timestampToTime3=(timestamp:any)=>{
var date = new Date(timestamp);//*1000//getHours getMinutes getSeconds
return addZero(date.getDate()) + '-'+ addTZero(date.getMonth()) + ' '+addZero(date.getHours())+ ':'+addZero(date.getMinutes());
}
\ No newline at end of file
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