Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TOSTUMI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Maple
TOSTUMI
Commits
7bc7b1f4
Commit
7bc7b1f4
authored
Sep 02, 2020
by
MrShi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev_ssz分支,业主模块调整
parent
6feedc2c
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
310 additions
and
83 deletions
+310
-83
config.ts
config/config.ts
+1
-1
proxy.ts
config/proxy.ts
+6
-6
tosUser.ts
src/models/tosUser.ts
+18
-1
TosUser.tsx
src/pages/UserManagement/tosUser/TosUser.tsx
+51
-48
TosUserDetails.tsx
src/pages/UserManagement/tosUser/TosUserDetails.tsx
+115
-16
TosUserEdit.tsx
src/pages/UserManagement/tosUser/TosUserEdit.tsx
+104
-10
commonUser.tsx
src/pages/UserManagement/tosUser/commonUser.tsx
+1
-1
tosUser.ts
src/services/tosUser.ts
+14
-0
No files found.
config/config.ts
View file @
7bc7b1f4
config/proxy.ts
View file @
7bc7b1f4
...
@@ -63,7 +63,7 @@ export default {
...
@@ -63,7 +63,7 @@ export default {
target: 'http://47.74.233.180:8651',
target: 'http://47.74.233.180:8651',
changeOrigin: true,
changeOrigin: true,
pathRewrite: { '^': '' },
pathRewrite: { '^': '' },
},*/
},*/
'/tos/'
:
{
'/tos/'
:
{
target
:
'http://localhost:8651'
,
target
:
'http://localhost:8651'
,
changeOrigin
:
true
,
changeOrigin
:
true
,
...
@@ -90,7 +90,7 @@ export default {
...
@@ -90,7 +90,7 @@ export default {
target
:
'http://47.74.233.180:8651'
,
target
:
'http://47.74.233.180:8651'
,
changeOrigin
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
pathRewrite
:
{
'^'
:
''
},
},
},
/* '/tos/': {
/* '/tos/': {
target: 'http://localhost:8651',
target: 'http://localhost:8651',
changeOrigin: true,
changeOrigin: true,
...
...
src/models/tosUser.ts
View file @
7bc7b1f4
import
{
deleteUnit
,
getOwnerQr
,
updateOwner
,
saveOwner
,
getOwnerDetail
,
getOwner
,
getTosUser
,
delAdvertisement
,
saveAdvertisement
,
quitAndUserAd
,
uploadApk
,
checkVideo
}
from
'@/services/tosUser'
;
import
{
getDetailUnitList
,
getDetailCommunityList
,
deleteUnit
,
getOwnerQr
,
updateOwner
,
saveOwner
,
getOwnerDetail
,
getOwner
,
getTosUser
,
delAdvertisement
,
saveAdvertisement
,
quitAndUserAd
,
uploadApk
,
checkVideo
}
from
'@/services/tosUser'
;
export
default
{
export
default
{
namespace
:
'tUModel'
,
namespace
:
'tUModel'
,
...
@@ -49,6 +49,23 @@ export default{
...
@@ -49,6 +49,23 @@ export default{
});
});
if
(
callback
)
callback
(
response
);
if
(
callback
)
callback
(
response
);
},
},
*
getDetailCommunityList
({
callback
,
payload
},{
call
,
put
})
{
const
response
=
yield
call
(
getDetailCommunityList
,
payload
);
yield
put
({
type
:
"save"
,
});
if
(
callback
)
callback
(
response
);
},
*
getDetailUnitList
({
callback
,
payload
},{
call
,
put
})
{
const
response
=
yield
call
(
getDetailUnitList
,
payload
);
yield
put
({
type
:
"save"
,
});
if
(
callback
)
callback
(
response
);
},
*
deleteUnit
({
callback
,
payload
},{
call
,
put
})
{
*
deleteUnit
({
callback
,
payload
},{
call
,
put
})
{
const
response
=
yield
call
(
deleteUnit
,
payload
);
const
response
=
yield
call
(
deleteUnit
,
payload
);
yield
put
({
yield
put
({
...
...
src/pages/UserManagement/tosUser/TosUser.tsx
View file @
7bc7b1f4
...
@@ -7,6 +7,7 @@ import {ConnectState} from "@/models/connect";
...
@@ -7,6 +7,7 @@ import {ConnectState} from "@/models/connect";
import
XLSX
from
"@/pages/account/xlsx.core.min"
;
import
XLSX
from
"@/pages/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"
;
class
TosUser
extends
React
.
Component
{
class
TosUser
extends
React
.
Component
{
...
@@ -14,6 +15,7 @@ class TosUser extends React.Component {
...
@@ -14,6 +15,7 @@ class TosUser extends React.Component {
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{
fileList
:
[],
data
:
[],
data
:
[],
province
:
undefined
,
province
:
undefined
,
city
:
undefined
,
city
:
undefined
,
...
@@ -215,7 +217,7 @@ class TosUser extends React.Component {
...
@@ -215,7 +217,7 @@ class TosUser extends React.Component {
// userPhone:"18813787835",
// userPhone:"18813787835",
// id:"240ebdfbac82417082ff789750760b83",
// id:"240ebdfbac82417082ff789750760b83",
// ownerName: "哈喽kk",
// ownerName: "哈喽kk",
communityArray
:
[
"A4"
,
"A7"
,
"A5"
]
//
communityArray: ["A4","A7","A5"]
};
};
this
.
props
.
dispatch
({
this
.
props
.
dispatch
({
type
:
'tUModel/getOwner'
,
type
:
'tUModel/getOwner'
,
...
@@ -259,7 +261,7 @@ class TosUser extends React.Component {
...
@@ -259,7 +261,7 @@ class TosUser extends React.Component {
if
(
nowUser
.
permission
[
i
]
==
"3"
){
if
(
nowUser
.
permission
[
i
]
==
"3"
){
flag
=
1
;
flag
=
1
;
this
.
props
.
dispatch
(
routerRedux
.
push
({
this
.
props
.
dispatch
(
routerRedux
.
push
({
pathname
:
'/tosUser/create'
,
pathname
:
'/
UserManagement/
tosUser/create'
,
query
:
params
,
query
:
params
,
}))
}))
}
}
...
@@ -269,7 +271,7 @@ class TosUser extends React.Component {
...
@@ -269,7 +271,7 @@ class TosUser extends React.Component {
if
(
nowUser
.
permission
[
i
]
==
"2"
){
if
(
nowUser
.
permission
[
i
]
==
"2"
){
flag
=
1
;
flag
=
1
;
this
.
props
.
dispatch
(
routerRedux
.
push
({
this
.
props
.
dispatch
(
routerRedux
.
push
({
pathname
:
'/tosUser/create'
,
pathname
:
'/
UserManagement/
tosUser/create'
,
query
:
params
,
query
:
params
,
}))
}))
}
}
...
@@ -302,7 +304,7 @@ class TosUser extends React.Component {
...
@@ -302,7 +304,7 @@ class TosUser extends React.Component {
if
(
nowUser
.
permission
[
i
]
==
"3"
){
if
(
nowUser
.
permission
[
i
]
==
"3"
){
flag
=
1
;
flag
=
1
;
this
.
props
.
dispatch
(
routerRedux
.
push
({
this
.
props
.
dispatch
(
routerRedux
.
push
({
pathname
:
'tosUser/edit'
,
pathname
:
'
/UserManagement/
tosUser/edit'
,
query
:
params
,
query
:
params
,
}))
}))
}
}
...
@@ -312,7 +314,7 @@ class TosUser extends React.Component {
...
@@ -312,7 +314,7 @@ class TosUser extends React.Component {
if
(
nowUser
.
permission
[
i
]
==
"2"
){
if
(
nowUser
.
permission
[
i
]
==
"2"
){
flag
=
1
;
flag
=
1
;
this
.
props
.
dispatch
(
routerRedux
.
push
({
this
.
props
.
dispatch
(
routerRedux
.
push
({
pathname
:
'/tosUser/edit'
,
pathname
:
'/
UserManagement/
tosUser/edit'
,
query
:
params
,
query
:
params
,
}))
}))
}
}
...
@@ -485,6 +487,28 @@ class TosUser extends React.Component {
...
@@ -485,6 +487,28 @@ class TosUser extends React.Component {
onOk
()
{},
onOk
()
{},
});
});
}
}
handleChange
=
(
info
)
=>
{
const
isJpgOrPng
=
info
.
file
.
type
===
'image/jpeg'
||
info
.
file
.
type
===
'image/png'
;
/* if (!isJpgOrPng) {
message.error('不支持 JPG/PNG 以外的文件!');
return;
}
const isLt2M = info.file.size / 1024 / 1024 < 20;
if (!isLt2M) {
message.error('文件大小不能超过 20MB!');
return;
}*/
let
fileList
=
[...
info
.
fileList
];
fileList
=
fileList
.
slice
(
-
6
);
fileList
=
fileList
.
map
(
file
=>
{
if
(
file
.
response
)
{
file
.
url
=
file
.
response
.
url
;
}
return
file
;
});
this
.
setState
({
fileList
});
};
//初始化
//初始化
componentDidMount
()
{
componentDidMount
()
{
// this.provinceload(0);
// this.provinceload(0);
...
@@ -653,6 +677,14 @@ class TosUser extends React.Component {
...
@@ -653,6 +677,14 @@ class TosUser extends React.Component {
const districtSelect = districtList.map((item) => (
const districtSelect = districtList.map((item) => (
<Select.Option value={item.code} label={item.name}>{item.name}</Select.Option>
<Select.Option value={item.code} label={item.name}>{item.name}</Select.Option>
));*/
));*/
const
CallBackTitleSearch
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
)
}
const
upload
=
{
action
:
'/tos/excel/upload?userId='
+
"007007"
,
onChange
:
this
.
handleChange
,
multiple
:
true
,
};
return
(
return
(
<
div
className=
{
styles
.
body
}
>
<
div
className=
{
styles
.
body
}
>
<
div
className=
{
styles
.
inputBox
}
>
<
div
className=
{
styles
.
inputBox
}
>
...
@@ -660,60 +692,31 @@ class TosUser extends React.Component {
...
@@ -660,60 +692,31 @@ class TosUser extends React.Component {
placeholder=
"User Name"
placeholder=
"User Name"
value=
{
name
}
value=
{
name
}
onChange=
{
(
e
)
=>
this
.
nameAndModelChange
(
e
)
}
/>
onChange=
{
(
e
)
=>
this
.
nameAndModelChange
(
e
)
}
/>
</
div
>
<
div
>
<
h1
>
choose
</
h1
>
<
SelectOptions
list=
{
[
'King Garden1'
,
'King Garden2'
,
'帝景花园小区'
,
'King Garden3'
,
'King Garden4'
,
'A9'
,
'King Garden5'
,
'King Garden6'
,
'CambirdgeGarden'
,
'King Garden7'
,
'帝景花园小区3期'
,
'A1'
,
'A7'
,
'A5'
,
'A4'
,
'A3'
,
'King Garden8'
,
'King Garden9'
,
'骏景花园1期'
,
'骏景花园11期'
,
'King Garden10'
,
'金碧花园2期'
,
'King Garden11'
,
'King Garden12'
,
'骏景花园10期'
,
'King Garden13'
,
'骏景花园2期'
,
'King Garden14'
,
'King Garden15'
,
'King Garden16'
,
'King Garden17'
,
'帝景花园小区2期'
,
'King Garden18'
,
'King Garden19'
,
'King Garden20'
,
'骏景花园8期'
,
'King Garden21'
,
'King Garden22'
,
'King Garden23'
,
'King Garden24'
]
}
onSubmit=
{
printContent
}
/>
</
div
>
</
div
>
{
/*<div style={{marginTop:5,marginBottom:5,backgroundColor:"#EEEEEE",padding:15}}>*/
}
<
TitleSearch
{
/* <div style={{paddingLeft:20 ,paddingRight:20}}>*/
}
listkey=
{
[
"providerName"
]
}
{
/* A B C D E F G H I J K L M N O P Q R S T U V W X Y Z*/
}
list=
{
[
"Service Provider"
]
}
{
/* <Radio style={{float:"right"}}>Select All</Radio><Radio style={{float:"right"}}>Unselect All</Radio>*/
}
community=
{
"serviceCommunityList"
}
{
/* </div>*/
}
onSubmit=
{
CallBackTitleSearch
}
/>
{
/* <div style={{backgroundColor:"#ffffff",margin:15}}>*/
}
{
/* <input id="area_name" style={{ width: '150px', marginLeft: 10, marginRight: 15,marginTop:15 }}*/
}
{
/* placeholder='Project Name' ></input>*/
}
{
/* <div>*/
}
{
/* <Row style={{paddingTop:20,paddingLeft:15}}>*/
}
{
/* /!*<label className={styles.backBox}>A1小区</label>*!/*/
}
{
/* /!*</Checkbox> <label className={styles.backBox}>A1小区</label>*!/*/
}
{
/* <Checkbox value="1" ><Button>A1 Project</Button></Checkbox>*/
}
{
/* <Checkbox value="2" ><Button>A2 Project</Button></Checkbox>*/
}
{
/* <Checkbox value="3" ><Button>A3 Project</Button></Checkbox>*/
}
{
/* <Checkbox value="4" ><Button>A4 Project</Button></Checkbox>*/
}
{
/* <Checkbox value="5" ><Button>A5 Project</Button></Checkbox>*/
}
{
/* <Checkbox value="6" ><Button>A6 Project</Button></Checkbox>*/
}
{
/* <Checkbox value="7" ><Button>A7 Project</Button></Checkbox>*/
}
{
/* </Row>*/
}
{
/* /!*<span className={styles.font} style={{margin: "5px 0px 5px 0px"}}></span>*!/*/
}
{
/* <Row style={{paddingTop:20,paddingBottom:20,paddingLeft:15}}>*/
}
{
/* <Checkbox value="8" ><Button>B1 Project</Button></Checkbox>*/
}
{
/* <Checkbox value="9" ><Button>B2 Project</Button></Checkbox>*/
}
{
/* <Checkbox value="10" ><Button>B3 Project</Button></Checkbox>*/
}
{
/* <Checkbox value="11" ><Button>B4 Project</Button></Checkbox>*/
}
{
/* <Checkbox value="12" ><Button>B5 Project</Button></Checkbox>*/
}
{
/* <Checkbox value="13" ><Button>B6 Project</Button></Checkbox>*/
}
{
/* <Checkbox value="14" ><Button>B7 Project</Button></Checkbox>*/
}
{
/* </Row>*/
}
{
/* </div>*/
}
{
/* </div>*/
}
{
/*</div>*/
}
<
div
>
<
div
>
<
Button
className=
{
styles
.
button1
}
onClick=
{
()
=>
this
.
getDevice
()
}
>
Search
</
Button
>
<
Button
className=
{
styles
.
button1
}
onClick=
{
()
=>
this
.
getDevice
()
}
>
Search
1
</
Button
>
{
/*<Button className={styles.button} onClick={() => this.reset()}>重置</Button>*/
}
{
/*<Button className={styles.button} onClick={() => this.reset()}>重置</Button>*/
}
<
Button
className=
{
styles
.
button2
}
onClick=
{
()
=>
this
.
edit
(
null
)
}
>
Create New Owner
</
Button
>
<
Button
className=
{
styles
.
button2
}
onClick=
{
()
=>
this
.
edit
(
null
)
}
>
Create New Owner
</
Button
>
<
Upload
{
...
uploadprops
}
>
{
/*
<Upload {...uploadprops}>
<Tooltip title="">
<Tooltip title="">
<Button className={styles.button2}
<Button className={styles.button2}
style={{width: 150}}>
style={{width: 150}}>
<Icon type="upload"/>Batch Upload
<Icon type="upload"/>Batch Upload
</Button>
</Button>
</Tooltip>
</Tooltip>
</Upload>*/
}
<
Upload
{
...
upload
}
fileList=
{
this
.
state
.
fileList
}
>
<
Button
className=
{
styles
.
button2
}
style=
{
{
width
:
150
}
}
>
<
Icon
type=
"upload"
/>
Batch Upload Excel
</
Button
>
</
Upload
>
</
Upload
>
</
div
>
</
div
>
<
div
>
<
div
>
...
...
src/pages/UserManagement/tosUser/TosUserDetails.tsx
View file @
7bc7b1f4
...
@@ -26,6 +26,8 @@ class TosUserDetails extends React.Component {
...
@@ -26,6 +26,8 @@ class TosUserDetails extends React.Component {
current
:
'record'
,
current
:
'record'
,
delData
:
[],
delData
:
[],
visible
:
false
,
visible
:
false
,
ownerCommunityList
:[],
ownerUnitList
:[]
}
}
}
}
...
@@ -136,6 +138,87 @@ class TosUserDetails extends React.Component {
...
@@ -136,6 +138,87 @@ class TosUserDetails extends React.Component {
visible
:
false
,
visible
:
false
,
});
});
};
};
//查询业主详情小区名
getDetailcommunity
=
()
=>
{
const
nowUser
=
this
.
props
.
currentUser
.
userid
;
const
params
=
{
type
:
this
.
state
.
type
,
userID
:
nowUser
,
// userPhone:"18813787835",
ownerId
:
this
.
props
.
location
.
query
.
id
,
owerName
:
this
.
props
.
location
.
query
.
owerName
,
/*communityName:this.props.location.query.communityName,
unit:this.props.location.query.buildingNumber+"#"+
this.props.location.query.floorNumber+"-"+
this.props.location.query.roomNumber*/
};
this
.
props
.
dispatch
({
type
:
'tUModel/getDetailCommunityList'
,
payload
:
params
,
callback
:
(
res
)
=>
{
if
(
res
)
{
console
.
log
(
res
);
if
(
res
.
error_code
==
"0000"
){
this
.
setState
({
communityData
:
res
.
data
.
rows
,
communitytotal
:
res
.
data
.
total
,
ownerCommunityList
:
res
.
data
.
ownerCommunity
,
})
}
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
(
"获取失败!未知错误!"
);
}
}
}
});
};
//查询业主详情小区名
getDetailUnit
=
()
=>
{
const
nowUser
=
this
.
props
.
currentUser
.
userid
;
const
params
=
{
type
:
this
.
state
.
type
,
userID
:
nowUser
,
// userPhone:"18813787835",
ownerId
:
this
.
props
.
location
.
query
.
id
,
owerName
:
this
.
props
.
location
.
query
.
owerName
,
communityName
:
this
.
props
.
location
.
query
.
communityName
,
/*unit:this.props.location.query.buildingNumber+"#"+
this.props.location.query.floorNumber+"-"+
this.props.location.query.roomNumber*/
};
this
.
props
.
dispatch
({
type
:
'tUModel/getDetailUnitList'
,
payload
:
params
,
callback
:
(
res
)
=>
{
if
(
res
)
{
console
.
log
(
res
);
if
(
res
.
error_code
==
"0000"
){
this
.
setState
({
unitData
:
res
.
data
.
rows
,
unitTotal
:
res
.
data
.
total
,
ownerUnitList
:
res
.
data
.
ownerUnit
,
})
}
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
(
"获取失败!未知错误!"
);
}
}
}
});
};
//获取二维码
//获取二维码
getQrCode
=
()
=>
{
getQrCode
=
()
=>
{
const
nowUser
=
this
.
props
.
currentUser
.
userid
;
const
nowUser
=
this
.
props
.
currentUser
.
userid
;
...
@@ -319,7 +402,7 @@ class TosUserDetails extends React.Component {
...
@@ -319,7 +402,7 @@ class TosUserDetails extends React.Component {
edit
=
(
params
)
=>
{
edit
=
(
params
)
=>
{
this
.
props
.
dispatch
(
routerRedux
.
push
({
this
.
props
.
dispatch
(
routerRedux
.
push
({
pathname
:
'/tosUser/common'
,
pathname
:
'/
UserManagement/
tosUser/common'
,
query
:
params
,
query
:
params
,
}))
}))
...
@@ -331,12 +414,13 @@ class TosUserDetails extends React.Component {
...
@@ -331,12 +414,13 @@ class TosUserDetails extends React.Component {
if
(
nowUser
.
permission
[
i
]
==
"11"
){
if
(
nowUser
.
permission
[
i
]
==
"11"
){
flag
=
1
;
flag
=
1
;
this
.
props
.
dispatch
(
routerRedux
.
push
({
this
.
props
.
dispatch
(
routerRedux
.
push
({
pathname
:
'/tosUser/common'
,
pathname
:
'/
UserManagement/
tosUser/common'
,
query
:
params
,
query
:
params
,
}))
}))
}
}
}
}
}
else
{
}
/*else{
for(let i=0;i<nowUser.permission.length;i++){
for(let i=0;i<nowUser.permission.length;i++){
if(nowUser.permission[i]=="10"){
if(nowUser.permission[i]=="10"){
flag = 1;
flag = 1;
...
@@ -346,7 +430,7 @@ class TosUserDetails extends React.Component {
...
@@ -346,7 +430,7 @@ class TosUserDetails extends React.Component {
}))
}))
}
}
}
}
}
}
*/
}
else
{
}
else
{
//alert("找不到用户权限记录!");
//alert("找不到用户权限记录!");
//return;;
//return;;
...
@@ -458,11 +542,16 @@ class TosUserDetails extends React.Component {
...
@@ -458,11 +542,16 @@ class TosUserDetails extends React.Component {
},()
=>
{
},()
=>
{
if
(
this
.
state
.
current
==
"record"
){
if
(
this
.
state
.
current
==
"record"
){
// this.getRecord();
// this.getRecord();
this
.
getDetailcommunity
();
this
.
getData
();
this
.
getData
();
this
.
getQrCode
();
this
.
getQrCode
();
this
.
getDetailUnit
();
}
else
{
}
else
{
this
.
getData
();
this
.
getData
();
this
.
getQrCode
();
this
.
getQrCode
();
this
.
getDetailcommunity
();
this
.
getDetailUnit
();
}
}
});
});
}
}
...
@@ -655,7 +744,13 @@ class TosUserDetails extends React.Component {
...
@@ -655,7 +744,13 @@ class TosUserDetails extends React.Component {
//渲染
//渲染
render
()
{
render
()
{
const
{
data
,
total
,
typeList
,
current
,
record
,
visible
,
tosUser
,
qrUrl
}
=
this
.
state
;
const
{
data
,
total
,
typeList
,
current
,
record
,
visible
,
tosUser
,
qrUrl
,
communityData
,
communitytotal
,
ownerCommunityList
,
unitTotal
,
unitData
,
ownerUnitList
}
=
this
.
state
;
const
typeSelect
=
typeList
.
map
((
item
,
index
)
=>
(
const
typeSelect
=
typeList
.
map
((
item
,
index
)
=>
(
<
Select
.
Option
value=
{
index
}
>
{
item
}
</
Select
.
Option
>
<
Select
.
Option
value=
{
index
}
>
{
item
}
</
Select
.
Option
>
...
@@ -703,7 +798,7 @@ class TosUserDetails extends React.Component {
...
@@ -703,7 +798,7 @@ class TosUserDetails extends React.Component {
{
this
.
props
.
location
.
query
.
communityName
}
{
this
.
props
.
location
.
query
.
communityName
}
</
Menu
.
Item
>
</
Menu
.
Item
>
<
Menu
.
Item
key=
"model"
>
<
Menu
.
Item
key=
"model"
>
A9
{
communitytotal
>
1
?
ownerCommunityList
[
1
]:
"A9"
}
</
Menu
.
Item
>
</
Menu
.
Item
>
</
Menu
>
</
Menu
>
</
div
>
</
div
>
...
@@ -721,6 +816,9 @@ class TosUserDetails extends React.Component {
...
@@ -721,6 +816,9 @@ class TosUserDetails extends React.Component {
<
span
className=
{
styles
.
detailsContent2
}
>
{
tosUser
}
</
span
>
<
span
className=
{
styles
.
detailsContent2
}
>
{
tosUser
}
</
span
>
<
span
className=
{
styles
.
detailsContent
}
>
{
this
.
props
.
location
.
query
.
roomNumber
}
</
span
>
<
span
className=
{
styles
.
detailsContent
}
>
{
this
.
props
.
location
.
query
.
roomNumber
}
</
span
>
<
span
className=
{
styles
.
detailsContent2
}
>
{
tosUser
}
</
span
>
<
span
className=
{
styles
.
detailsContent2
}
>
{
tosUser
}
</
span
>
{
/* <img style ={{width:100,height:100,float:"right"}}src= {"http://www.srthinker.com:5205/file/d575594254a141f29d23d711d9158ba5.png"} />
<Button className={styles.button1} onClick={() => this.DeleteUnit()}>Delete Unit</Button>
*/
}
</
div
>
</
div
>
{
/* <Select className={styles.input} placeholder="警报类型" onChange={(e) => this.typeChange(e)}
{
/* <Select className={styles.input} placeholder="警报类型" onChange={(e) => this.typeChange(e)}
...
@@ -737,15 +835,14 @@ class TosUserDetails extends React.Component {
...
@@ -737,15 +835,14 @@ class TosUserDetails extends React.Component {
<
div
>
<
div
>
{
current
==
'record'
?
{
current
==
'record'
?
<
div
>
<
div
>
<
img
style
={{
width
:100,
height
:100,
float
:"
right
"}}
src=
{
this
.
state
.
qrUrl
}
/>
<
Button
className=
{
styles
.
button1
}
onClick=
{
()
=>
this
.
DeleteUnit
()
}
>
Delete Unit
</
Button
>
<
Button
className=
{
styles
.
button1
}
onClick=
{
()
=>
this
.
DeleteUnit
()
}
>
Delete Unit
</
Button
>
<
img
style
={{
width
:100,
height
:100,
float
:"
right
"}}
src=
{
this
.
props
.
location
.
query
.
cdkStatus
==
0
?
qrUrl
:
"http://www.srthinker.com:5205/file/d575594254a141f29d23d711d9158ba5.png"
}
/>
</
div
>
</
div
>
:
''
}
:
''
}
{
current
==
'model'
?
{
current
==
'model'
?
<
div
>
<
div
>
<
img
style
={{
width
:100,
height
:100,
float
:"
right
"}}
src=
{
"http://www.srthinker.com:5205/file/d575594254a141f29d23d711d9158ba5.png"
}
/>
<
img
style
={{
width
:100,
height
:100,
float
:"
right
"}}
src=
{
this
.
props
.
location
.
query
.
cdkStatus
==
0
?
qrUrl
:
"http://www.srthinker.com:5205/file/d575594254a141f29d23d711d9158ba5.png"
}
/>
<
Button
className=
{
styles
.
button1
}
onClick=
{
()
=>
this
.
getData
()
}
>
Delete Unit
</
Button
>
<
Button
className=
{
styles
.
button1
}
onClick=
{
()
=>
this
.
DeleteUnit
()
}
>
Delete Unit
</
Button
>
</
div
>
</
div
>
:
''
}
:
''
}
{
/* {current == 'model'?
{
/* {current == 'model'?
...
@@ -767,10 +864,10 @@ class TosUserDetails extends React.Component {
...
@@ -767,10 +864,10 @@ class TosUserDetails extends React.Component {
<
div
>
<
div
>
<
span
className=
{
styles
.
detailsContent
}
>
Unit No.
</
span
>
<
span
className=
{
styles
.
detailsContent
}
>
Unit No.
</
span
>
<
span
className=
{
styles
.
detailsContent2
}
>
{
tosUser
}
</
span
>
<
span
className=
{
styles
.
detailsContent2
}
>
{
tosUser
}
</
span
>
<
span
className=
{
styles
.
detailsContent
}
>
03#05-301
</
span
>
<
span
className=
{
styles
.
detailsContent
}
>
{
unitTotal
>
1
?
ownerUnitList
[
1
]:
"03#06-369"
}
</
span
>
<
span
className=
{
styles
.
detailsContent2
}
>
{
tosUser
}
</
span
>
<
span
className=
{
styles
.
detailsContent2
}
>
{
tosUser
}
</
span
>
<
img
style
={{
width
:100,
height
:100,
float
:"
right
"}}
src=
{
"http://www.srthinker.com:5205/file/d575594254a141f29d23d711d9158ba5.png"
}
/>
<
img
style
={{
width
:100,
height
:100,
float
:"
right
"}}
src=
{
this
.
props
.
location
.
query
.
cdkStatus
==
0
?
qrUrl
:
"http://www.srthinker.com:5205/file/d575594254a141f29d23d711d9158ba5.png"
}
/>
<
Button
className=
{
styles
.
button1
}
onClick=
{
()
=>
this
.
getRecord
()
}
>
Delete Unit
</
Button
>
<
Button
className=
{
styles
.
button1
}
onClick=
{
()
=>
this
.
DeleteUnit
()
}
>
Delete Unit
</
Button
>
</
div
>
</
div
>
...
@@ -804,8 +901,10 @@ class TosUserDetails extends React.Component {
...
@@ -804,8 +901,10 @@ class TosUserDetails extends React.Component {
<
span
className=
{
styles
.
detailsContent2
}
>
{
tosUser
}
</
span
>
<
span
className=
{
styles
.
detailsContent2
}
>
{
tosUser
}
</
span
>
<
span
className=
{
styles
.
detailsContent
}
>
03#05-301
</
span
>
<
span
className=
{
styles
.
detailsContent
}
>
03#05-301
</
span
>
<
span
className=
{
styles
.
detailsContent2
}
>
{
tosUser
}
</
span
>
<
span
className=
{
styles
.
detailsContent2
}
>
{
tosUser
}
</
span
>
<
img
style
={{
width
:100,
height
:100,
float
:"
right
"}}
src=
{
"http://www.srthinker.com:5205/file/d575594254a141f29d23d711d9158ba5.png"
}
/>
{
/*<img style ={{width:100,height:100,float:"right"}}src= {"http://www.srthinker.com:5205/file/d575594254a141f29d23d711d9158ba5.png"} />*/
}
<
Button
className=
{
styles
.
button1
}
onClick=
{
()
=>
this
.
getRecord
()
}
>
Delete Unit
</
Button
>
<
img
style
={{
width
:100,
height
:100,
float
:"
right
"}}
src=
{
this
.
props
.
location
.
query
.
cdkStatus
==
0
?
qrUrl
:
"http://www.srthinker.com:5205/file/d575594254a141f29d23d711d9158ba5.png"
}
/>
<
Button
className=
{
styles
.
button1
}
onClick=
{
()
=>
this
.
DeleteUnit
()
}
>
Delete Unit
</
Button
>
</
div
>
</
div
>
<
Table
<
Table
rowKey=
{
record
=>
record
.
warnID
}
rowKey=
{
record
=>
record
.
warnID
}
...
...
src/pages/UserManagement/tosUser/TosUserEdit.tsx
View file @
7bc7b1f4
...
@@ -26,6 +26,8 @@ class TosUserEdit extends React.Component {
...
@@ -26,6 +26,8 @@ class TosUserEdit extends React.Component {
current
:
'record'
,
current
:
'record'
,
delData
:
[],
delData
:
[],
visible
:
false
,
visible
:
false
,
ownerCommunityList
:[],
ownerUnitList
:[]
}
}
}
}
...
@@ -136,6 +138,87 @@ class TosUserEdit extends React.Component {
...
@@ -136,6 +138,87 @@ class TosUserEdit extends React.Component {
visible
:
false
,
visible
:
false
,
});
});
};
};
//查询业主详情小区名
getDetailcommunity
=
()
=>
{
const
nowUser
=
this
.
props
.
currentUser
.
userid
;
const
params
=
{
type
:
this
.
state
.
type
,
userID
:
nowUser
,
// userPhone:"18813787835",
ownerId
:
this
.
props
.
location
.
query
.
id
,
owerName
:
this
.
props
.
location
.
query
.
owerName
,
/*communityName:this.props.location.query.communityName,
unit:this.props.location.query.buildingNumber+"#"+
this.props.location.query.floorNumber+"-"+
this.props.location.query.roomNumber*/
};
this
.
props
.
dispatch
({
type
:
'tUModel/getDetailCommunityList'
,
payload
:
params
,
callback
:
(
res
)
=>
{
if
(
res
)
{
console
.
log
(
res
);
if
(
res
.
error_code
==
"0000"
){
this
.
setState
({
communityData
:
res
.
data
.
rows
,
communitytotal
:
res
.
data
.
total
,
ownerCommunityList
:
res
.
data
.
ownerCommunity
,
})
}
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
(
"获取失败!未知错误!"
);
}
}
}
});
};
//查询业主详情小区名
getDetailUnit
=
()
=>
{
const
nowUser
=
this
.
props
.
currentUser
.
userid
;
const
params
=
{
type
:
this
.
state
.
type
,
userID
:
nowUser
,
// userPhone:"18813787835",
ownerId
:
this
.
props
.
location
.
query
.
id
,
owerName
:
this
.
props
.
location
.
query
.
owerName
,
communityName
:
this
.
props
.
location
.
query
.
communityName
,
/*unit:this.props.location.query.buildingNumber+"#"+
this.props.location.query.floorNumber+"-"+
this.props.location.query.roomNumber*/
};
this
.
props
.
dispatch
({
type
:
'tUModel/getDetailUnitList'
,
payload
:
params
,
callback
:
(
res
)
=>
{
if
(
res
)
{
console
.
log
(
res
);
if
(
res
.
error_code
==
"0000"
){
this
.
setState
({
unitData
:
res
.
data
.
rows
,
unitTotal
:
res
.
data
.
total
,
ownerUnitList
:
res
.
data
.
ownerUnit
,
})
}
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
(
"获取失败!未知错误!"
);
}
}
}
});
};
//获取二维码
//获取二维码
getQrCode
=
()
=>
{
getQrCode
=
()
=>
{
const
nowUser
=
this
.
props
.
currentUser
.
userid
;
const
nowUser
=
this
.
props
.
currentUser
.
userid
;
...
@@ -289,12 +372,13 @@ class TosUserEdit extends React.Component {
...
@@ -289,12 +372,13 @@ class TosUserEdit extends React.Component {
if
(
nowUser
.
permission
[
i
]
==
"11"
){
if
(
nowUser
.
permission
[
i
]
==
"11"
){
flag
=
1
;
flag
=
1
;
this
.
props
.
dispatch
(
routerRedux
.
push
({
this
.
props
.
dispatch
(
routerRedux
.
push
({
pathname
:
'/tosUser/common'
,
pathname
:
'/
UserManagement/
tosUser/common'
,
query
:
params
,
query
:
params
,
}))
}))
}
}
}
}
}
else
{
}
/* else{
for(let i=0;i<nowUser.permission.length;i++){
for(let i=0;i<nowUser.permission.length;i++){
if(nowUser.permission[i]=="10"){
if(nowUser.permission[i]=="10"){
flag = 1;
flag = 1;
...
@@ -304,7 +388,7 @@ class TosUserEdit extends React.Component {
...
@@ -304,7 +388,7 @@ class TosUserEdit extends React.Component {
}))
}))
}
}
}
}
}
}
*/
}
else
{
}
else
{
//alert("找不到用户权限记录!");
//alert("找不到用户权限记录!");
//return;;
//return;;
...
@@ -427,9 +511,13 @@ class TosUserEdit extends React.Component {
...
@@ -427,9 +511,13 @@ class TosUserEdit extends React.Component {
// this.getRecord();
// this.getRecord();
this
.
getData
();
this
.
getData
();
this
.
getQrCode
();
this
.
getQrCode
();
this
.
getDetailcommunity
();
this
.
getDetailUnit
();
}
else
{
}
else
{
this
.
getData
();
this
.
getData
();
this
.
getQrCode
();
this
.
getQrCode
();
this
.
getDetailcommunity
();
this
.
getDetailUnit
();
// this.getData();
// this.getData();
}
}
});
});
...
@@ -623,7 +711,13 @@ class TosUserEdit extends React.Component {
...
@@ -623,7 +711,13 @@ class TosUserEdit extends React.Component {
//渲染
//渲染
render
()
{
render
()
{
const
{
data
,
total
,
typeList
,
current
,
record
,
visible
,
tosUser
,
sn
,
sn1
,
sn2
,
qrUrl
}
=
this
.
state
;
const
{
data
,
total
,
typeList
,
current
,
record
,
visible
,
tosUser
,
sn
,
sn1
,
sn2
,
qrUrl
,
communityData
,
communitytotal
,
ownerCommunityList
,
unitTotal
,
unitData
,
ownerUnitList
}
=
this
.
state
;
const
typeSelect
=
typeList
.
map
((
item
,
index
)
=>
(
const
typeSelect
=
typeList
.
map
((
item
,
index
)
=>
(
<
Select
.
Option
value=
{
index
}
>
{
item
}
</
Select
.
Option
>
<
Select
.
Option
value=
{
index
}
>
{
item
}
</
Select
.
Option
>
...
@@ -680,7 +774,7 @@ class TosUserEdit extends React.Component {
...
@@ -680,7 +774,7 @@ class TosUserEdit extends React.Component {
{
this
.
props
.
location
.
query
.
communityName
}
{
this
.
props
.
location
.
query
.
communityName
}
</
Menu
.
Item
>
</
Menu
.
Item
>
<
Menu
.
Item
key=
"model"
>
<
Menu
.
Item
key=
"model"
>
A9
{
communitytotal
>
1
?
ownerCommunityList
[
1
]:
"A9"
}
</
Menu
.
Item
>
</
Menu
.
Item
>
</
Menu
>
</
Menu
>
</
div
>
</
div
>
...
@@ -714,14 +808,14 @@ class TosUserEdit extends React.Component {
...
@@ -714,14 +808,14 @@ class TosUserEdit extends React.Component {
<
div
>
<
div
>
{
current
==
'record'
?
{
current
==
'record'
?
<
div
>
<
div
>
<
img
style
={{
width
:100,
height
:100,
float
:"
right
"}}
src=
{
this
.
state
.
qrUrl
}
/>
<
img
style
={{
width
:100,
height
:100,
float
:"
right
"}}
src=
{
this
.
props
.
location
.
query
.
cdkStatus
==
0
?
qrUrl
:
"http://www.srthinker.com:5205/file/d575594254a141f29d23d711d9158ba5.png"
}
/>
{
/*<Button className={styles.button1} onClick={() => this.getRecord()}>删除单位</Button>*/
}
{
/*<Button className={styles.button1} onClick={() => this.getRecord()}>删除单位</Button>*/
}
</
div
>
</
div
>
:
''
}
:
''
}
{
current
==
'model'
?
{
current
==
'model'
?
<
div
>
<
div
>
<
img
style
={{
width
:100,
height
:100,
float
:"
right
"}}
src=
{
"http://www.srthinker.com:5205/file/d575594254a141f29d23d711d9158ba5.png"
}
/>
<
img
style
={{
width
:100,
height
:100,
float
:"
right
"}}
src=
{
this
.
props
.
location
.
query
.
cdkStatus
==
0
?
qrUrl
:
"http://www.srthinker.com:5205/file/d575594254a141f29d23d711d9158ba5.png"
}
/>
{
/*<Button className={styles.button1} onClick={() => this.getData()}>删除单位1</Button>*/
}
{
/*<Button className={styles.button1} onClick={() => this.getData()}>删除单位1</Button>*/
}
</
div
>
</
div
>
:
''
}
:
''
}
...
@@ -744,9 +838,9 @@ class TosUserEdit extends React.Component {
...
@@ -744,9 +838,9 @@ class TosUserEdit extends React.Component {
<
div
>
<
div
>
<
span
className=
{
styles
.
detailsContent
}
>
Unit No.
</
span
>
<
span
className=
{
styles
.
detailsContent
}
>
Unit No.
</
span
>
<
span
className=
{
styles
.
detailsContent2
}
>
{
tosUser
}
</
span
>
<
span
className=
{
styles
.
detailsContent2
}
>
{
tosUser
}
</
span
>
<
span
className=
{
styles
.
detailsContent
}
>
03#05-301
</
span
>
<
span
className=
{
styles
.
detailsContent
}
>
{
unitTotal
>
1
?
ownerUnitList
[
1
]:
"03#06-369"
}
</
span
>
<
span
className=
{
styles
.
detailsContent2
}
>
{
tosUser
}
</
span
>
<
span
className=
{
styles
.
detailsContent2
}
>
{
tosUser
}
</
span
>
<
img
style
={{
width
:100,
height
:100,
float
:"
right
"}}
src=
{
"http://www.srthinker.com:5205/file/d575594254a141f29d23d711d9158ba5.png"
}
/>
<
img
style
={{
width
:100,
height
:100,
float
:"
right
"}}
src=
{
this
.
props
.
location
.
query
.
cdkStatus
==
0
?
qrUrl
:
"http://www.srthinker.com:5205/file/d575594254a141f29d23d711d9158ba5.png"
}
/>
{
/*<Button className={styles.button1} onClick={() => this.getRecord()}>删除单位</Button>*/
}
{
/*<Button className={styles.button1} onClick={() => this.getRecord()}>删除单位</Button>*/
}
</
div
>
</
div
>
...
@@ -781,7 +875,7 @@ class TosUserEdit extends React.Component {
...
@@ -781,7 +875,7 @@ class TosUserEdit extends React.Component {
<
span
className=
{
styles
.
detailsContent2
}
>
{
tosUser
}
</
span
>
<
span
className=
{
styles
.
detailsContent2
}
>
{
tosUser
}
</
span
>
<
span
className=
{
styles
.
detailsContent
}
>
03#05-301
</
span
>
<
span
className=
{
styles
.
detailsContent
}
>
03#05-301
</
span
>
<
span
className=
{
styles
.
detailsContent2
}
>
{
tosUser
}
</
span
>
<
span
className=
{
styles
.
detailsContent2
}
>
{
tosUser
}
</
span
>
<
img
style
={{
width
:100,
height
:100,
float
:"
right
"}}
src=
{
"http://www.srthinker.com:5205/file/d575594254a141f29d23d711d9158ba5.png"
}
/>
<
img
style
={{
width
:100,
height
:100,
float
:"
right
"}}
src=
{
this
.
props
.
location
.
query
.
cdkStatus
==
0
?
qrUrl
:
"http://www.srthinker.com:5205/file/d575594254a141f29d23d711d9158ba5.png"
}
/>
{
/*<Button className={styles.button1} onClick={() => this.getRecord()}>删除单位</Button>*/
}
{
/*<Button className={styles.button1} onClick={() => this.getRecord()}>删除单位</Button>*/
}
</
div
>
</
div
>
<
Table
<
Table
...
...
src/pages/UserManagement/tosUser/commonUser.tsx
View file @
7bc7b1f4
...
@@ -234,7 +234,7 @@ class TosUserCreate extends React.Component {
...
@@ -234,7 +234,7 @@ class TosUserCreate extends React.Component {
//跳转到设备页面
//跳转到设备页面
back
=
()
=>
{
back
=
()
=>
{
this
.
props
.
dispatch
(
routerRedux
.
push
({
this
.
props
.
dispatch
(
routerRedux
.
push
({
pathname
:
'/UserManagement/tosUser
/edit
'
,
pathname
:
'/UserManagement/tosUser'
,
}))
}))
};
};
//初始化
//初始化
...
...
src/services/tosUser.ts
View file @
7bc7b1f4
...
@@ -47,6 +47,20 @@ export async function deleteUnit(params) {
...
@@ -47,6 +47,20 @@ export async function deleteUnit(params) {
data
:
params
,
data
:
params
,
});
});
}
}
export
async
function
getDetailCommunityList
(
params
)
{
return
request
(
'/tos/tosOwner/getDetail/community'
,
{
method
:
'POST'
,
data
:
params
,
});
}
export
async
function
getDetailUnitList
(
params
)
{
return
request
(
'/tos/tosOwner/getDetail/unit'
,
{
method
:
'POST'
,
data
:
params
,
});
}
export
async
function
delAdvertisement
(
params
)
{
export
async
function
delAdvertisement
(
params
)
{
return
request
(
'/api/ad/del'
,
{
return
request
(
'/api/ad/del'
,
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment