Commit 4160c41d authored by MrShi's avatar MrShi

新开dev_ssz分支,业主模块相关

parent 54d57050
...@@ -80,13 +80,24 @@ export default defineConfig({ ...@@ -80,13 +80,24 @@ export default defineConfig({
name: 'usemanagement', name: 'usemanagement',
icon:'ProfileOutlined', icon:'ProfileOutlined',
routes: [ routes: [
{ /* {
path: './LIFEUserManagement', path: './LIFEUserManagement',
name: 'lifeusers', name: 'lifeusers',
routes: [ routes: [
{ path: './', component: './UserManagement/LIFEUserManagement/Users' }, { path: './', component: './UserManagement/LIFEUserManagement/Users' },
{ path: './Add', component: './UserManagement/LIFEUserManagement/UsersAdd' }, { path: './Add', component: './UserManagement/LIFEUserManagement/UsersAdd' },
] ]
},*/
{
path: './tosUser',
name: 'lifeusers',
routes: [
{ path: './', component: './UserManagement/tosUser/TosUser' },
{ path: './create', component: './UserManagement/tosUser/TosUserCreate' },
{ path: './common', component: './UserManagement/tosUser/commonUser' },
{ path: './edit', component: './UserManagement/tosUser/TosUserEdit' },
{ path: './details', component: './UserManagement/tosUser/TosUserDetails' },
]
}, },
{ {
path: './ServiceProviderManagement', path: './ServiceProviderManagement',
...@@ -105,6 +116,29 @@ export default defineConfig({ ...@@ -105,6 +116,29 @@ export default defineConfig({
}, },
] ]
}, },
/*{
path: '/tosUser/create',
component: './tosUser/TosUserCreate',
hideInMenu: true,
},
{
path: '/tosUser/common',
component: './tosUser/commonUser',
hideInMenu: true,
},
{
path: '/tosUser/edit',
component: './tosUser/TosUserEdit',
hideInMenu: true,
},
{
path: '/tosUser/details',
component: './tosUser/TosUserDetails',
hideInMenu: true,
},*/
{ {
path: '/PropertyManagement', path: '/PropertyManagement',
name: 'propertymanagement', name: 'propertymanagement',
......
...@@ -7,17 +7,57 @@ ...@@ -7,17 +7,57 @@
*/ */
export default { export default {
dev: { dev: {
'/api/': { /* '/api/': {
target: 'https://preview.pro.ant.design', target: 'https://preview.pro.ant.design',
changeOrigin: true, changeOrigin: true,
pathRewrite: { '^': '' }, pathRewrite: { '^': '' },
},*/
'/api/': {
target: 'http://localhost:8080',
changeOrigin: true,
pathRewrite: { '^': '' },
},
'/res/': {
target: 'http://mapleonlyone.top',
changeOrigin: true,
pathRewrite: { '^': '' },
},
'/cash/tos-manager/bill/': {
target: 'http://acc-huahui.oss-cn-shenzhen.aliyuncs.com',
changeOrigin: true,
pathRewrite: { '^': '' },
},
'/tos/': {
target: 'http://47.74.233.180:8651',
changeOrigin: true,
pathRewrite: { '^': '' },
}, },
}, },
test: { test: {
'/api/': { /* '/api/': {
target: 'https://preview.pro.ant.design', target: 'https://preview.pro.ant.design',
changeOrigin: true, changeOrigin: true,
pathRewrite: { '^': '' }, pathRewrite: { '^': '' },
},*/
'/api/': {
target: 'http://localhost:8080',
changeOrigin: true,
pathRewrite: { '^': '' },
},
'/res/': {
target: 'http://mapleonlyone.top',
changeOrigin: true,
pathRewrite: { '^': '' },
},
'/cash/tos-manager/bill/': {
target: 'http://acc-huahui.oss-cn-shenzhen.aliyuncs.com',
changeOrigin: true,
pathRewrite: { '^': '' },
},
'/tos/': {
target: 'http://47.74.233.180:8651',
changeOrigin: true,
pathRewrite: { '^': '' },
}, },
}, },
pre: { pre: {
......
...@@ -32,11 +32,6 @@ ...@@ -32,11 +32,6 @@
"test:component": "umi test ./src/components", "test:component": "umi test ./src/components",
"tsc": "tsc" "tsc": "tsc"
}, },
"husky": {
"hooks": {
"pre-commit": "npm run lint-staged"
}
},
"lint-staged": { "lint-staged": {
"**/*.less": "stylelint --syntax less", "**/*.less": "stylelint --syntax less",
"**/*.{js,jsx,ts,tsx}": "npm run lint-staged:js", "**/*.{js,jsx,ts,tsx}": "npm run lint-staged:js",
...@@ -50,6 +45,7 @@ ...@@ -50,6 +45,7 @@
"not ie <= 10" "not ie <= 10"
], ],
"dependencies": { "dependencies": {
"js-export-excel": "^1.1.2",
"@ant-design/icons": "^4.0.0", "@ant-design/icons": "^4.0.0",
"@ant-design/pro-layout": "^5.0.16", "@ant-design/pro-layout": "^5.0.16",
"@ant-design/pro-table": "2.3.4", "@ant-design/pro-table": "2.3.4",
......
import {getOwnerDetail,getOwner, getTosUser,delAdvertisement,saveAdvertisement,quitAndUserAd,uploadApk,checkVideo } from '@/services/tosUser';
export default{
namespace: 'tUModel',
state: {
data: [],
},
effects: {
*getTosUser({callback,payload},{ call, put }) {
const response = yield call(getTosUser,payload);
yield put({
type: "get",
});
if(callback) callback(response);
},
*getOwner({callback,payload},{ call, put }) {
const response = yield call(getOwner,payload);
yield put({
type: "getOwner",
});
if(callback) callback(response);
},
*getOwnerDetail({callback,payload},{ call, put }) {
const response = yield call(getOwnerDetail,payload);
yield put({
type: "getOwnerDetail",
});
if(callback) callback(response);
},
*delAdvertisement({callback,payload},{ call, put }) {
const response = yield call(delAdvertisement,payload);
yield put({
type: "del",
});
if(callback) callback(response);
},
*saveAdvertisement({callback,payload},{ call, put }) {
const response = yield call(saveAdvertisement,payload);
yield put({
type: "save",
});
if(callback) callback(response);
},
*quitAndUserAd({callback,payload},{ call, put }) {
const response = yield call(quitAndUserAd,payload);
yield put({
type: "quit",
});
if(callback) callback(response);
},
*uploadApk({callback,payload},{ call, put }) {
const response = yield call(uploadApk,payload);
yield put({
type: "apk",
});
if(callback) callback(response);
},
*checkVideo({callback,payload},{ call, put }) {
const response = yield call(checkVideo,payload);
yield put({
type: "check",
});
if(callback) callback(response);
},
},
reducers: {
get(state, action) {
return {
...state,
data:action.payload || {},
};
},
getOwner(state, action) {
return {
...state,
data:action.payload || {},
};
},
getOwnerDetail(state, action) {
return {
...state,
data:action.payload || {},
};
},
del(state, action) {
return {
...state,
data:action.payload || {},
};
},
save(state, action) {
return {
...state,
data:action.payload || {},
};
},
quit(state, action) {
return {
...state,
data:action.payload || {},
};
},
apk(state, action) {
return {
...state,
data:action.payload || {},
};
},
check(state, action) {
return {
...state,
data:action.payload || {},
};
},
},
};
import React, { Component, PropTypes } from 'react';
import { Checkbox } from 'antd';
import { connect } from 'dva';
import styles from './style.less';
const CheckboxGroup = Checkbox.Group;
const CheckGroup=({
checkId,
checkAll,
checkedList,
checkAllValue,
checkAllLable,
hasChildren,
children,
dispatch,
character,
allListId,
indeterminate,
checkAllId
})=>{
function onCheckAllChange(e){
let newList=character.newList;
newList[checkId]={
['allListId'+checkId]:allListId,
['checkAllId'+checkId]:checkAllId,
['checkedList'+checkId]: e.target.checked ? allListId : [],
// ['indeterminate'+checkId]: !indeterminate,
['checkAll'+checkId]: e.target.checked,
};
dispatch({
type:'character/getAuthorityList',
payload:{
newList:newList
}
})
}
function selectCheckbox(checkedList){
let newList=character.newList;
newList[checkId]={
['allListId'+checkId]:allListId,
['checkAllId'+checkId]:checkAllId,
['checkedList'+checkId]: checkedList,
// ['indeterminate'+checkId]: !!checkedList.length && (checkedList.length < allListId.length),
['checkAll'+checkId]: checkedList.length >0,
};
dispatch({
type:'character/updateState',
payload:{
newList:newList
}
})
}
return(
<div className={styles.allCheckbox} id={checkId}>
<Checkbox checked={checkAll } value={checkAllValue} onChange={(e)=>onCheckAllChange(e)} >{ checkAllLable}</Checkbox >
{
hasChildren ?
<CheckboxGroup className={styles.subCheckbox} value={checkedList} onChange={selectCheckbox}>
{
children.map((sub, subKey) => {
return <Checkbox value={sub.menuid} id={`${sub.menuid}`} key={subKey} >{sub.name}</Checkbox >
})
}
</CheckboxGroup > : null
}
</div >
)
}
CheckGroup.propTypes = {
// searchValue: PropTypes.string,
// characterList: PropTypes.array,
// dispatch: PropTypes.func,
// showSubModal: PropTypes.bool,
// deteleSubModal: PropTypes.bool
};
export default connect(({ character, loading }) => ({ character, loading }))(CheckGroup);
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
@import '~antd/lib/style/themes/default.less';
.pre {
margin: 12px 0;
padding: 12px 20px;
background: @input-bg;
box-shadow: @card-shadow;
}
.input {
width:200px;
height:34px;
border:1px solid rgba(229, 229, 229, 1);
border-radius:5px;
margin: 0px 10px;
}
.input1 {
width:200px;
height:34px;
border:1px solid rgba(229, 229, 229, 1);
border-radius:5px;
margin: 0px 120px 10px;
}
.body {
background:rgba(255,255,255,1);
border:1px solid rgba(229, 229, 229, 1);
}
.inputBox {
width:1250px;
height:50px;
padding-top: 10px;
}
.downIcon {
position: relative;
left: 80px;
}
.downButton {
width:120px;
height:34px;
border:1px solid rgba(229, 229, 229, 1);
border-radius:5px;
margin: 0px 10px;
text-align: left;
}
.button11 {
width:82px;
height:34px;
background:rgba(234,244,255,1);
border:1px solid rgba(178, 215, 255, 1);
font-size:14px;
font-family:PingFang SC;
font-weight:400;
color:rgba(66,159,255,1);
line-height:34px;
margin:20px 20px 7px 10px;
float: left;
}
.button1 {
width:150px;
height:34px;
background:rgba(234,244,255,1);
border:1px solid rgba(178, 215, 255, 1);
font-size:14px;
font-family:PingFang SC;
font-weight:400;
color:rgba(66,159,255,1);
line-height:34px;
margin: 7px 10px;
float: right;
}
.button2 {
width:150px;
height:34px;
background:rgba(24,144,255,1);
border-radius:4px;
font-size:14px;
font-family:PingFang SC;
font-weight:400;
color:rgba(255,255,255,1);
line-height:34px;
margin: 7px 10px;
float: left;
}
.button3 {
position: relative;
bottom: 52px;
width:72px;
height:32px;
background:rgba(255,255,255,1);
border:1px solid rgba(229, 229, 229, 1);
border-radius:4px;
margin: 10px 10px;
}
.table {
margin-right: 10px;
}
.detailsTitle {
display: inline-block;
font-size:18px;
font-family:PingFang SC;
font-weight:400;
color:rgba(73,73,73,1);
margin: 0px 30px;
}
.detailsContent {
display: inline-block;
font-size:15px;
width: 100px;
font-family:PingFang SC;
font-weight:400;
color:rgba(153,153,153,1);
margin: 10px 10px;
}
.detailsContent2 {
display: inline-block;
font-size:18px;
width: 200px;
font-family:PingFang SC;
font-weight:400;
color:rgba(51,51,51,1);
}
.detailsBox {
border-top: 1px solid rgba(229, 229, 229, 1);
margin: 10px 30px;
}
.font1 {
.detailsContent {
font-family:PingFang SC;
font-weight:400;
color:rgba(153,153,153,1);
margin: 5px 10px;
}
.backBox{
border: 1px solid rgb(0, 12, 23);
font-size: 2em;
margin: 50px ;
background: #1153ff;
}
.allCheckbox{
}
.subCheckbox{
}
}
This diff is collapsed.
This diff is collapsed.
import React from 'react';
import {connect,routerRedux} from 'dva';
import {Button, Input} from "antd";
import styles from './style.less';
import {ConnectState} from "@/models/connect";
import {router} from "umi";
class AccountReset extends React.Component {
//构造
constructor(props) {
super(props);
this.state = {
pw: '',
pw2: '',
newPw: '',
}
}
/*----------------- 方法集 ------------------*/
//跳转到账户页面
back = () => {
this.props.dispatch(routerRedux.push({
pathname: '/account',
}))
};
//两次密码校对
checkPw = () => {
if (this.state.pw == '') {
alert("未输入原密码!");
return;
}
if (this.state.pw2 == '') {
alert("未再次输入密码!");
return;
}
if (this.state.pw != this.state.pw2) {
alert("两次输入的原始密码不同!");
return;
} else if (this.state.newPw != ''){
this.checkUserPw();
}else{
alert("未输入新密码!");
return;
}
};
//检测密码
checkUserPw = () => {
const params = {
username: this.props.currentUser.name,
password: this.state.pw,
};
this.props.dispatch({
type: 'user/checkUserPw',
payload: params,
callback: (res) => {
if (res) {
if(res.error_code=="0000"){
this.handleOk();
}else if(res.error_code == "0001"){
alert(res.error_msg);
}else{
alert("密码校验失败!未知错误!")
}
}
}
});
};
handleOk = () => {
const params = {
userStatus: 1,//暂时写死
userID: this.props.currentUser.userid,
userPassword: this.state.newPw,
oneself: 1,
// userAccount: this.props.currentUser.name,
};
this.props.dispatch({
type: 'accountModel/saveAccount',
payload: params,
callback: (res) => {
console.log(res);
if (res.error_code == "0000") {
alert(res.error_msg);
this.back();
} else if (res.error_code == "0001") {
alert(res.error_msg);
this.back();
} else if (res.error_code == "0002"){
alert(res.error_msg);
} else if(res.error_code == "0008"){
alert(res.error_msg);
window.location.href = '/';
router.replace('/');
} else {
alert("提交失败!未知错误!");
}
}
});
};
//密码变更
pwChange = (e) => {
this.setState({pw: e.target.value});
};
//确认密码变更
pwChange2 = (e) => {
this.setState({pw2: e.target.value});
};
//新密码变更
newPwChange = (e) => {
this.setState({newPw: e.target.value});
};
//提交
onSubmit = () => {
this.checkPw();
};
//初始化
componentDidMount() {}
/*--------------------------------------*/
//渲染
render() {
const {} = this.state;
return (
<div className={styles.body}>
<div style={{marginTop: 48}}>
<div className={styles.detailsBox}>
<div>
<span className={styles.detailsContent}>原始密码</span>
<Input.Password className={styles.input}
onChange={(e) => this.pwChange(e)}/>
</div>
<div>
<span className={styles.detailsContent}>新密码</span>
<Input.Password className={styles.input}
onChange={(e) => this.newPwChange(e)}/>
</div>
<div>
<span className={styles.detailsContent}>重复密码</span>
<Input.Password className={styles.input}
onChange={(e) => this.pwChange2(e)}/>
</div>
<div>
<Button className={styles.button1} onClick={() => this.onSubmit()}>提交</Button>
<Button className={styles.button1} onClick={() => this.back()}>返回</Button>
</div>
</div>
</div>
</div>
);
}
}
export default connect(({user}: ConnectState) => ({
currentUser: user.currentUser,
}))(AccountReset);
@import '~antd/lib/style/themes/default.less';
.pre {
margin: 12px 0;
padding: 12px 20px;
background: @input-bg;
box-shadow: @card-shadow;
}
.input {
width:200px;
height:34px;
border:1px solid rgba(229, 229, 229, 1);
border-radius:5px;
margin: 0px 10px;
}
.body {
background:rgba(255,255,255,1);
border:1px solid rgba(229, 229, 229, 1);
}
.inputBox {
width:1250px;
height:50px;
padding-top: 10px;
}
.downIcon {
position: relative;
left: 80px;
}
.downButton {
width:120px;
height:34px;
border:1px solid rgba(229, 229, 229, 1);
border-radius:5px;
margin: 0px 10px;
text-align: left;
}
.button1 {
width:82px;
height:34px;
background:rgba(234,244,255,1);
border:1px solid rgba(178, 215, 255, 1);
font-size:14px;
font-family:PingFang SC;
font-weight:400;
color:rgba(66,159,255,1);
line-height:34px;
margin: 10px 10px;
}
.button2 {
width:82px;
height:34px;
background:rgba(24,144,255,1);
border-radius:4px;
font-size:14px;
font-family:PingFang SC;
font-weight:400;
color:rgba(255,255,255,1);
line-height:34px;
margin: 7px 10px;
}
.button3 {
position: relative;
bottom: 52px;
width:72px;
height:32px;
background:rgba(255,255,255,1);
border:1px solid rgba(229, 229, 229, 1);
border-radius:4px;
margin: 10px 10px;
}
.table {
margin-right: 10px;
}
.detailsTitle {
display: inline-block;
font-size:18px;
font-family:PingFang SC;
font-weight:400;
color:rgba(73,73,73,1);
margin: 0px 30px;
}
.detailsContent {
display: inline-block;
font-size:18px;
width: 100px;
font-family:PingFang SC;
font-weight:400;
color:rgba(153,153,153,1);
margin: 10px 10px;
}
.detailsContent2 {
display: inline-block;
font-size:18px;
width: 200px;
font-family:PingFang SC;
font-weight:400;
color:rgba(51,51,51,1);
}
.detailsBox {
border-top: 1px solid rgba(229, 229, 229, 1);
margin: 10px 30px;
}
.font {
color:rgba(153,153,153,1);
display: block;
}
This diff is collapsed.
import request from '@/utils/request';
export async function getTosUser(params) {
return request('/tos/owner/getuser', {
method: 'POST',
data: params,
});
}
export async function getOwner(params) {
return request('/tos/tosOwner/getAll', {
method: 'POST',
data: params,
});
}
export async function getOwnerDetail(params) {
return request('/tos/tosOwner/getDetail', {
method: 'POST',
data: params,
});
}
export async function delAdvertisement(params) {
return request('/api/ad/del', {
method: 'POST',
data: params,
});
}
export async function saveAdvertisement(params) {
return request('/api/ad/save', {
method: 'POST',
data: params,
});
}
export async function quitAndUserAd(params) {
return request('/api/ad/quitAndUserAd', {
method: 'POST',
data: params,
});
}
export async function uploadApk(params) {
return request('/api/uploadApk/apk', {
method: 'POST',
data: params,
});
}
export async function checkVideo(params) {
return request('/api/uploadApk/prview', {
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