Commit 0c2e3a87 authored by MrShi's avatar MrShi

dev_ssz分支,账号模块

parent 9a75f2ba
...@@ -245,14 +245,24 @@ export default defineConfig({ ...@@ -245,14 +245,24 @@ export default defineConfig({
name: 'accountmanagement', name: 'accountmanagement',
icon:'UserSwitchOutlined', icon:'UserSwitchOutlined',
routes: [ routes: [
{ /* {
path: './AccountManagement', path: './AccountManagement',
name: 'accountmanagement1', name: 'accountmanagement1',
routes: [ routes: [
{path:'./',component: './AccountManagement/AccountManagement/Account'}, {path:'./',component: './AccountManagement/AccountManagement/Account'},
{path: './AccountManagementEdit',component:'./AccountManagement/AccountManagement/AccountManagement'}, {path: './AccountManagementEdit',component:'./AccountManagement/AccountManagement/AccountManagement'},
] ]
},*/
{
path: './AccountManagement',
name: 'accountmanagement1',
routes: [
{path:'./',component: './AccountManagement/account/Account'},
{path: './AccountManagementEdit',component:'./AccountManagement/AccountManagement/AccountManagement'},
]
}, },
{ {
path: './CompanyInformation', path: './CompanyInformation',
name: 'companyinformation', name: 'companyinformation',
......
import { getAccount,delAccount,saveAccount,getAllLeader,checkAccountByName,quitAndUser } from '@/services/account';
export default{
namespace: 'accountModel',
state: {
data: [],
},
effects: {
*getAccount({callback,payload},{ call, put }) {
const response = yield call(getAccount,payload);
yield put({
type: "getUsers",
});
if(callback) callback(response);
},
*saveAccount({callback,payload},{ call, put }) {
const response = yield call(saveAccount,payload);
yield put({
type: "save",
});
if(callback) callback(response);
},
*delAdccount({callback,payload},{ call, put }) {
const response = yield call(delAccount,payload);
yield put({
type: "del",
});
if(callback) callback(response);
},
*getAllLeader({callback,payload},{ call, put }) {
const response = yield call(getAllLeader,payload);
yield put({
type: "allLeader",
});
if(callback) callback(response);
},
*checkAccountByName({callback,payload},{ call, put }) {
const response = yield call(checkAccountByName,payload);
yield put({
type: "checkUser",
});
if(callback) callback(response);
},
*quitAndUser({callback,payload},{ call, put }) {
const response = yield call(quitAndUser,payload);
yield put({
type: "quitUser",
});
if(callback) callback(response);
},
},
reducers: {
allLeader(state, action) {
return {
...state,
data:action.payload || {},
};
},
getUsers(state, action) {
return {
...state,
data:action.payload || {},
};
},
save(state, action) {
return {
...state,
data:action.payload || {},
};
},
del(state, action) {
return {
...state,
data:action.payload || {},
};
},
checkUser(state, action) {
return {
...state,
data:action.payload || {},
};
},
quitUser(state, action) {
return {
...state,
data:action.payload || {},
};
},
},
};
@import '~antd/lib/style/themes/default.less'; @import '../../../../node_modules/antd/lib/style/themes/default.less';
.pre { .pre {
margin: 12px 0; margin: 12px 0;
......
...@@ -4,7 +4,7 @@ import {Table, Button, Input, Select, Modal, Tooltip, Upload, Icon, Checkbox, Ro ...@@ -4,7 +4,7 @@ import {Table, Button, Input, Select, Modal, Tooltip, Upload, Icon, Checkbox, Ro
from "antd"; from "antd";
import styles from './style.less'; import styles from './style.less';
import {ConnectState} from "@/models/connect"; import {ConnectState} from "@/models/connect";
import XLSX from "@/pages/account/xlsx.core.min"; import XLSX from "@/pages/AccountManagement/account/xlsx.core.min";
import 'moment/locale/zh-cn'; import 'moment/locale/zh-cn';
import SelectOptions from '../../../components/SelectOptions/index'; import SelectOptions from '../../../components/SelectOptions/index';
import TitleSearch from "@/components/TitleSearch/TitleSearch"; import TitleSearch from "@/components/TitleSearch/TitleSearch";
......
...@@ -314,13 +314,13 @@ class TosUserCreate extends React.Component { ...@@ -314,13 +314,13 @@ class TosUserCreate extends React.Component {
<div> <div>
<span className={styles.detailsContent}>User Type</span> <span className={styles.detailsContent}>User Type</span>
{/*<Input className={styles.input} value={sn} onChange={(e) => this.snChange(e)}/>*/} {/*<Input className={styles.input} value={sn} onChange={(e) => this.snChange(e)}/>*/}
<span className={styles.detailsContent}>Family Member</span> <span className={styles.detailsContent}>{this.props.location.query.owner_relationship ==1 ?"家属":"租户"}</span>
</div> </div>
<div> <div>
<span className={styles.detailsContent}>Full Name</span> <Button className={styles.button1} onClick={() => this.onSubmit()}>Cancel Account</Button> <span className={styles.detailsContent}>Full Name</span> <Button className={styles.button1} onClick={() => this.onSubmit()}>Cancel Account</Button>
{/*<Input className={styles.input} value={model} placeholder="小区名称" onChange={(e) => this.modelChange(e)} />*/} {/*<Input className={styles.input} value={model} placeholder="小区名称" onChange={(e) => this.modelChange(e)} />*/}
<span className={styles.detailsContent}>kamon.chen</span> <span className={styles.detailsContent}>{this.props.location.query.ower_name}</span>
{/* <Input className={styles.input} value={name} placeholder="楼号" onChange={(e) => this.nameChange(e)} /> {/* <Input className={styles.input} value={name} placeholder="楼号" onChange={(e) => this.nameChange(e)} />
...@@ -332,14 +332,12 @@ class TosUserCreate extends React.Component { ...@@ -332,14 +332,12 @@ class TosUserCreate extends React.Component {
</div> </div>
<div> <div>
<span className={styles.detailsContent}>Contact Details</span> <span className={styles.detailsContent}>Contact Details</span>
<span className={styles.detailsContent}>132222222</span> <span className={styles.detailsContent}>{this.props.location.query.owner_family_phone==null?this.props.location.query.ower_phone:this.props.location.query.owner_family_phone}</span>
<span className={styles.detailsContent}>sales@huahuico.com</span> <span className={styles.detailsContent}>{this.props.location.query.owner_family_email==null?this.props.location.query.owner_email:this.props.location.query.owner_family_email}</span>
</div> </div>
<div style={{marginTop:120}}> <div style={{marginTop:120}}>
</div> </div>
</div> </div>
</div> </div>
......
import request from '@/utils/request';
export async function getAccount(params) {
return request('/api/tos/user/getAllInfrom', {
method: 'POST',
data: params,
});
}
export async function delAccount(params) {
return request('/api/tos/users/del', {
method: 'POST',
data: params,
});
}
export async function saveAccount(params) {
return request('/api/tos/users/save', {
method: 'POST',
data: params,
});
}
export async function getAllLeader(params) {
return request('/api/users/getAllLeader', {
method: 'POST',
data: params,
});
}
export async function checkAccountByName(params) {
return request('/api/tos/checkAccount/username', {
method: 'POST',
data: params,
});
}
export async function quitAndUser(params) {
return request('/api/tos/users/quitAndUser', {
method: 'POST',
data: params,
});
}
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