Commit 9a7f6f7c authored by MrShi's avatar MrShi

dev分支,访客记录模块

parent c8a8c3d5
import { getAllDevice,saveDevice,delDevice,getDeviceNum,getNewAddBug,importUserDeviceListExcel,
import { getAllNotice,getAllDevice,saveDevice,delDevice,getDeviceNum,getNewAddBug,importUserDeviceListExcel,
getUserDevice,saveUserDevice,getTargetKeys,getNewAdd,importUserListExcel,getDeviceDetails } from '@/services/communityNotice';
import { getRegion,getRegionList } from '@/services/region';
......@@ -8,6 +8,16 @@ export default{
data: [],
},
effects: {
*getAllNotice({callback,payload},{ call, put }) {
const response = yield call(getAllNotice,payload);
yield put({
type: "getAll",
});
if(callback) callback(response);
},
*getAllDevice({callback,payload},{ call, put }) {
const response = yield call(getAllDevice,payload);
yield put({
......
import { getAllDevice,saveDevice,delDevice,getDeviceNum,getNewAddBug,importUserDeviceListExcel,
import {getAllCommunity, getAllDevice,saveDevice,delDevice,getDeviceNum,getNewAddBug,importUserDeviceListExcel,
getUserDevice,saveUserDevice,getTargetKeys,getNewAdd,importUserListExcel,getDeviceDetails } from '@/services/housingList';
import { getRegion,getRegionList } from '@/services/region';
......@@ -8,6 +8,15 @@ export default{
data: [],
},
effects: {
*getAllCommunity({callback,payload},{ call, put }) {
const response = yield call(getAllCommunity,payload);
yield put({
type: "getAll",
});
if(callback) callback(response);
},
*getAllDevice({callback,payload},{ call, put }) {
const response = yield call(getAllDevice,payload);
yield put({
......
import { getAdvertisement,delAdvertisement,saveAdvertisement,quitAndUserAd,uploadApk,checkVideo } from '@/services/visitorRecord';
import { getVisitorRecord,getAdvertisement,delAdvertisement,saveAdvertisement,quitAndUserAd,uploadApk,checkVideo } from '@/services/visitorRecord';
export default{
namespace: 'visitorRecordModel',
......@@ -6,6 +6,13 @@ export default{
data: [],
},
effects: {
*getVisitorRecord({callback,payload},{ call, put }) {
const response = yield call(getVisitorRecord,payload);
yield put({
type: "getAd",
});
if(callback) callback(response);
},
*getAdvertisement({callback,payload},{ call, put }) {
const response = yield call(getAdvertisement,payload);
yield put({
......
......@@ -6,6 +6,7 @@ import {ConnectState} from "@/models/connect";
import XLSX from './xlsx.core.min';
import {router} from "umi";
import permission from "@/models/permission";
import TitleSearch from "@/components/TitleSearch/TitleSearch";
let go = 0;
......@@ -563,7 +564,9 @@ class AccountEdit extends React.Component {
return false;
},
};
const CallBackTitleSearch = (comment: any)=>{
console.log(comment)
}
return (
<div className={styles.body}>
<div style={{marginTop: 48}}>
......@@ -621,6 +624,14 @@ class AccountEdit extends React.Component {
allowClear={true}>{adSelect}</Select>
</div>:''}
<TitleSearch
listkey={["providerName"]}
list={["Service Provider"]}
community={"serviceCommunityList"}
onSubmit={CallBackTitleSearch} />
<div>
<div style={{marginTop:20}}>
{/*<span className={styles.detailsContent}*/}
......
......@@ -218,21 +218,21 @@ class CommunityNotice extends React.Component {
userPhone:"18813787835"
};
this.props.dispatch({
type: 'tUModel/getTosUser',
type: 'communityNoticeModel/getAllNotice',
payload: params,
callback: (res) => {
if (res) {
this.setState({
/* this.setState({
data: res.rows,
total: res.total,
})
// if(res.error_code == "0000"){
// this.setState({
// data: res.data.rows,
// total: res.data.total,
// })
// }
})*/
if(res.error_code == "0000"){
this.setState({
data: res.data.rows,
total: res.data.total,
})
}
if(res.error_code == "0001"){
alert(res.error_msg);
......@@ -254,6 +254,10 @@ class CommunityNotice extends React.Component {
edit = (params) => {
let flag = 0;
const nowUser = this.props.currentUser;
this.props.dispatch(routerRedux.push({
pathname: '/CommunityManagement/CommunityAnnouncement/Create',
query: params,
}))
if(nowUser.permission!=null){
if(params==null){
for(let i=0;i<nowUser.permission.length;i++){
......@@ -280,13 +284,13 @@ class CommunityNotice extends React.Component {
// alert("找不到用户权限记录!");
// return;
}
if(flag == 0){
/*if(flag == 0){
if(params==null){
alert("缺少设备添加权限!");
}else{
alert("缺少设备修改权限!");
}
}
}*/
};
//跳转到编辑页面
......@@ -490,26 +494,33 @@ class CommunityNotice extends React.Component {
//表格列名
columns = [
{
title: 'User Name',
dataIndex: 'owerName',
key: 'owerName',
title: 'Project Name',
dataIndex: 'communityNum',
key: 'communityNum',
},
{
title: 'Announcement Title',
dataIndex: 'noticTitlel',
key: 'noticTitlel',
},
{
title: 'Project',
dataIndex: 'owerPhone',
key: 'owerPhone',
title: 'noticText',
dataIndex: 'noticText',
key: 'noticText',
},
{
title: 'Affiliated Unit',
dataIndex: 'buildingNumber',
key: 'buildingNumber',
title: 'ReleaseTime',
dataIndex: 'noticStartTime',
key: 'noticStartTime',
},
{
title: 'User Status',
dataIndex: 'enable',
key: 'enable',
title: 'Status',
dataIndex: 'noticScope',
key: 'noticScope',
render: (text, record) => (
<span>{record.enable == '1' ? "注册" : "未注册"}</span>
<span>{record.noticScope == '1' ? "全部小区" : "对应小区"}</span>
),
/* render: (text, record) => (
......
......@@ -8,6 +8,7 @@ import TextArea from 'antd/lib/input/TextArea';
import { PlusOutlined } from '@ant-design/icons';
import SelectOptions from '../../../components/SelectOptions/index';
import TitleSearch from "@/components/TitleSearch/TitleSearch";
const printContent = (comment: any)=>{
console.log(comment)
}
......@@ -47,7 +48,9 @@ const Template = () => {
};
const handleChange = (Obj: any) => { setFileList(Obj.fileList) }
const CallBackTitleSearch = (comment: any)=>{
console.log(comment)
}
return (
<div className={styles.base}>
......@@ -58,10 +61,16 @@ const Template = () => {
</div>
{/*<SelectOptions list={["美国", "美丽的", "美好", "加拿大", "加油", "XO"].sort()} onSubmit={printContent} />*/}
<SelectOptions list={["A1 Project","B1 Project","C1 Project","D1 Project","E1 Project","F1 Project"
{/* <SelectOptions list={["A1 Project","B1 Project","C1 Project","D1 Project","E1 Project","F1 Project"
,"G1 Project","H1 Project","I1 Project","J1 Project","K1 Project","L1 Project","M1 Project","N1 Project"
,"O1 Project","P1 Project","Q1 Project","R1 Project","S1 Project","T1 Project","U1 Project","V1 Project"
,"W1 Project","X1 Project","Y1 Project","Z1 Project"]} onSubmit={printContent}/>
,"W1 Project","X1 Project","Y1 Project","Z1 Project"]} onSubmit={printContent}/>*/}
<TitleSearch
listkey={["providerName"]}
list={["Service Provider"]}
community={"serviceCommunityList"}
onSubmit={CallBackTitleSearch} />
<div className={styles.box1}>
<div className={styles.box1item1}>Announcement Title</div>
<div className={styles.box1item2}><Input style={{width:500}}/></div>
......
......@@ -6,6 +6,7 @@ import {ConnectState} from "@/models/connect";
/*import XLSX from "@/pages/account/xlsx.core.min";*/
import {router} from "umi";
import SelectOptions from '../../../components/SelectOptions/index';
import TitleSearch from "@/components/TitleSearch/TitleSearch";
......@@ -219,21 +220,21 @@ class HousingList extends React.Component {
userPhone:"18813787835"
};
this.props.dispatch({
type: 'tUModel/getTosUser',
type: 'housingListModel/getAllCommunity',
payload: params,
callback: (res) => {
if (res) {
this.setState({
data: res.rows,
total: res.total,
})
// if(res.error_code == "0000"){
// this.setState({
// data: res.data.rows,
// total: res.data.total,
// })
// }
// this.setState({
// data: res.rows,
// total: res.total,
// })
if(res.error_code == "0000"){
this.setState({
data: res.data.rows,
total: res.data.total,
})
}
if(res.error_code == "0001"){
alert(res.error_msg);
......@@ -255,6 +256,10 @@ class HousingList extends React.Component {
edit = (params) => {
let flag = 0;
const nowUser = this.props.currentUser;
this.props.dispatch(routerRedux.push({
pathname: '/CommunityManagement/housingList/Create',
query: params,
}))
if(nowUser.permission!=null){
if(params==null){
for(let i=0;i<nowUser.permission.length;i++){
......@@ -281,13 +286,13 @@ class HousingList extends React.Component {
//alert("找不到用户权限记录!");
//return;;
}
if(flag == 0){
/*if(flag == 0){
if(params==null){
alert("缺少设备添加权限!");
}else{
alert("缺少设备修改权限!");
}
}
}*/
};
//跳转到编辑页面
......@@ -320,13 +325,13 @@ class HousingList extends React.Component {
//alert("找不到用户权限记录!");
//return;;
}
if(flag == 0){
/* if(flag == 0){
if(params==null){
alert("缺少设备添加权限!");
}else{
alert("缺少设备修改权限!");
}
}
}*/
};
//跳转到详情页面
......@@ -491,21 +496,31 @@ class HousingList extends React.Component {
//表格列名
columns = [
{
title: 'User Name',
dataIndex: 'owerName',
key: 'owerName',
title: 'Project Name',
dataIndex: 'residentialName',
key: 'residentialName',
},
{
title: 'Administrator',
dataIndex: 'residentialManagerUserName',
key: 'residentialManagerUserName',
},
{
title: 'Project',
dataIndex: 'owerPhone',
key: 'owerPhone',
title: 'Operation Hour',
dataIndex: 'residentialHotlineServieStartTime',
key: 'residentialHotlineServieStartTime',
},
{
title: 'Affiliated Unit',
dataIndex: 'buildingNumber',
key: 'buildingNumber',
title: 'Office Tel',
dataIndex: 'residentialPhone',
key: 'residentialPhone',
},
{
title: 'Address',
dataIndex: 'residentialAddress',
key: 'residentialAddress',
},
/* {
title: 'User Status',
dataIndex: 'enable',
key: 'enable',
......@@ -513,26 +528,9 @@ class HousingList extends React.Component {
<span>{record.enable == '1' ? "注册" : "未注册"}</span>
),
/* render: (text, record) => (
<>
{record.map(enable => {
let color = 'green';
if (enable === '1') {
color = 'volcano';
}
if (enable === '0') {
color = 'geekblue';
}
return (
<Tag color={color} key={enable}>
{enable.toUpperCase()}
</Tag>
);
}
</>
),*/
},
},*/
/*{
title: '用户类型',
......@@ -651,6 +649,10 @@ class HousingList extends React.Component {
const districtSelect = districtList.map((item) => (
<Select.Option value={item.code} label={item.name}>{item.name}</Select.Option>
));*/
const CallBackTitleSearch = (comment: any)=>{
console.log(comment)
}
return (
<div className={styles.body}>
<div className={styles.inputBox}>
......@@ -711,25 +713,31 @@ class HousingList extends React.Component {
}
</div>*/}
<div>
{/* <div>
<h1>Hello World</h1>
<SelectOptions list={["A1 Project","B1 Project","C1 Project","D1 Project","E1 Project","F1 Project"
,"G1 Project","H1 Project","I1 Project","J1 Project","K1 Project","L1 Project","M1 Project","N1 Project"
,"O1 Project","P1 Project","Q1 Project","R1 Project","S1 Project","T1 Project","U1 Project","V1 Project"
,"W1 Project","X1 Project","Y1 Project","Z1 Project"]} onSubmit={printContent}/>
</div>
</div>*/}
<TitleSearch
listkey={["providerName"]}
list={["Service Provider"]}
community={"serviceCommunityList"}
onSubmit={CallBackTitleSearch} />
<div>
<Button className={styles.button1} onClick={() => this.getDevice()}>Search</Button>
{/*<Button className={styles.button} onClick={() => this.reset()}>重置</Button>*/}
<Button className={styles.button2} onClick={() => this.edit(null)}>Create cell</Button>
{/* <Upload {...uploadprops}>
<Upload {...uploadprops}>
<Tooltip title="">
<Button className={styles.button2}
style={{width: 150}}>
<Icon type="upload"/>Batch Upload
</Button>
</Tooltip>
</Upload>*/}
</Upload>
</div>
<div>
<Table
......
......@@ -6,6 +6,7 @@ import {ConnectState} from "@/models/connect";
// import XLSX from "@/pages/account/xlsx.core.min";
import {router} from "umi";
import SelectOptions from '../../../components/SelectOptions/index';
import TitleSearch from "@/components/TitleSearch/TitleSearch";
......@@ -219,21 +220,21 @@ class VisitorRecord extends React.Component {
userPhone:"18813787835"
};
this.props.dispatch({
type: 'tUModel/getTosUser',
type: 'visitorRecordModel/getVisitorRecord',
payload: params,
callback: (res) => {
if (res) {
this.setState({
/* this.setState({
data: res.rows,
total: res.total,
})
// if(res.error_code == "0000"){
// this.setState({
// data: res.data.rows,
// total: res.data.total,
// })
// }
})*/
if(res.error_code == "0000"){
this.setState({
data: res.data.rows,
total: res.data.total,
})
}
if(res.error_code == "0001"){
alert(res.error_msg);
......@@ -491,21 +492,48 @@ class VisitorRecord extends React.Component {
//表格列名
columns = [
{
title: 'invitor',
dataIndex: 'owerName',
key: 'owerName',
title: 'invitees',
dataIndex: 'inviterName',
key: 'inviterName',
},
{
title: 'Visitor',
dataIndex: 'owerPhone',
key: 'owerPhone',
dataIndex: 'visitorsName',
key: 'visitorsName',
},
{
title: 'Security Guarder',
dataIndex: 'buildingNumber',
key: 'buildingNumber',
title: 'Security Staff',
dataIndex: 'securityGuardName',
key: 'securityGuardName',
},
{
title: 'License Plate',
dataIndex: 'numberPlate',
key: 'numberPlate',
},
{
title: 'Time of Arrival',
dataIndex: 'createTime',
key: 'createTime',
},
{
title: 'Project',
dataIndex: 'inviterAddress',
key: 'inviterAddress',
},
{
title: 'Address',
dataIndex: 'visitorCommunity',
key: 'visitorCommunity',
},
{
title: 'cdkCode',
dataIndex: 'cdkCode',
key: 'cdkCode',
},
/* {
title: 'Car Templete',
dataIndex: 'enable',
key: 'enable',
......@@ -513,26 +541,7 @@ class VisitorRecord extends React.Component {
<span>{record.enable == '1' ? "注册" : "未注册"}</span>
),
/* render: (text, record) => (
<>
{record.map(enable => {
let color = 'green';
if (enable === '1') {
color = 'volcano';
}
if (enable === '0') {
color = 'geekblue';
}
return (
<Tag color={color} key={enable}>
{enable.toUpperCase()}
</Tag>
);
}
</>
),*/
},
},*/
/*{
title: '用户类型',
......@@ -651,6 +660,9 @@ class VisitorRecord extends React.Component {
const districtSelect = districtList.map((item) => (
<Select.Option value={item.code} label={item.name}>{item.name}</Select.Option>
));*/
const CallBackTitleSearch = (comment: any)=>{
console.log(comment)
}
return (
<div className={styles.body}>
<div className={styles.inputBox}>
......@@ -725,15 +737,19 @@ class VisitorRecord extends React.Component {
</Upload>
</div>
<div>
{/* <div>
<h1>Hello World</h1>
<SelectOptions list={["A1 Project","B1 Project","C1 Project","D1 Project","E1 Project","F1 Project"
,"G1 Project","H1 Project","I1 Project","J1 Project","K1 Project","L1 Project","M1 Project","N1 Project"
,"O1 Project","P1 Project","Q1 Project","R1 Project","S1 Project","T1 Project","U1 Project","V1 Project"
,"W1 Project","X1 Project","Y1 Project","Z1 Project"]} onSubmit={printContent}/>
</div>
</div>*/}
<TitleSearch
listkey={["providerName"]}
list={["Service Provider"]}
community={"serviceCommunityList"}
onSubmit={CallBackTitleSearch} />
<div>
<Table
rowKey={record => record.deviceID}
......
......@@ -7,6 +7,15 @@ export interface LoginParamsType {
captcha: string;
}
export async function getAllNotice(params: LoginParamsType) {
return request('/tos/tosCommunityNotic/get/', {
method: 'POST',
data: params,
});
}
export async function fakeAccountLogin(params: LoginParamsType) {
return request('/api/tos/user/login/', {
method: 'POST',
......
......@@ -7,6 +7,13 @@ export interface LoginParamsType {
captcha: string;
}
export async function getAllCommunity(params: LoginParamsType) {
return request('/tos/tosCommunity/get', {
method: 'POST',
data: params,
});
}
export async function fakeAccountLogin(params: LoginParamsType) {
return request('/api/tos/user/login/', {
method: 'POST',
......
import request from '@/utils/request';
export async function getVisitorRecord(params) {
return request('/tos/tosVisitorRecord/get', {
method: 'POST',
data: params,
});
}
export async function getAdvertisement(params) {
return request('/api/ad/get', {
method: 'POST',
......
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