diff --git a/src/pages/configurations/models/configurations.js b/src/pages/configurations/models/configurations.js
index 56cc2d9..126118d 100644
--- a/src/pages/configurations/models/configurations.js
+++ b/src/pages/configurations/models/configurations.js
@@ -21,7 +21,8 @@ export default {
priceFloor: 0,
workUploading: 0,
inTimeConfine: 0,
- outTimeConfine: 0
+ outTimeConfine: 0,
+ alarmSystem: 0
},
selectValue: '1'
@@ -40,6 +41,7 @@ export default {
*fetchAppBase({ _ }, { call, put }) {
const response = yield call(getConfigurationsApp);
+ console.log(response);
yield put({
type: 'updateState',
payload: {
@@ -52,8 +54,10 @@ export default {
*fetchSave({ params }, { call, put, select }) {
const response = yield call(save, params);
+ console.log(response);
if (response.success) {
const selectValue = yield select(state => state.configurations.selectValue);
+ console.log(selectValue);
message.success('设置成功')
if (selectValue === '1') {
yield put({
diff --git a/src/pages/customer/CulumnModal.jsx b/src/pages/customer/CulumnModal.jsx
new file mode 100644
index 0000000..4dea4c8
--- /dev/null
+++ b/src/pages/customer/CulumnModal.jsx
@@ -0,0 +1,151 @@
+import React from 'react';
+import { Modal, Checkbox } from 'antd';
+import { connect } from 'dva';
+import { times } from 'lodash';
+const CheckboxGroup = Checkbox.Group;
+const plainOptions = ['Apple', 'Pear', 'Orange'];
+const defaultCheckedList = ['Apple', 'Orange'];
+
+class CulumnModal extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ isVisible: false,
+ // checkedList: defaultCheckedList,
+ indeterminate: true,
+ checkAll: false,
+ list: []
+ };
+ }
+
+ onCheckAllChange=(a,b)=>{
+ console.log(a);
+ console.log(b);
+ }
+
+ onChangeb = (listg,checkedValues,c) => {
+ console.log(c);
+ // console.log(listg);
+ if(this.state.list==[]){
+ this.setState({list:listg})
+ }
+ // console.log(this.state.list);
+ // console.log(checkedValues);
+ let linshilist=this.state.list
+ let flag=true
+ for(let i=0;i
{
+ const { dispatch, customerId } = this.props;
+ console.log(this.props);
+ dispatch({
+ type: 'customer/fetchCulunm',
+ payload: customerId,
+ });
+ this.setState({
+ isVisible: true,
+ });
+ };
+
+ // 点击确定
+ handleOk = () => {
+ const {dispatch, customerId} = this.props;
+ const {list} = this.state;
+ console.log(this.state);
+ dispatch({
+ type: 'customer/fetchUpdateCulumn',
+ payload: {
+ customerId,
+ list
+ }
+ });
+ this.setState({
+ isVisible: false,
+ });
+ };
+
+ // 点击取消
+ handleCancel = () => {
+ this.setState({
+ isVisible: false,
+ });
+ };
+
+ render() {
+ const {
+ customer: { culumnList },
+ } = this.props;
+ console.log(this.props);
+ const { isVisible } = this.state;
+ return (
+
+
+ 所属栏目
+
+
+
+ {culumnList
+ ? culumnList.map((item, index) => (
+
+
+ this.onCheckAllChange(e,item)}
+ // checked={checkAll}
+ key={index}
+ >
+ {item.toCompanyName}
+
+
+
+
+ {item.programList
+ ? item.programList.map((items, indexs) => (
+ this.onChangeb(item.programIdList,items.programId,this.state.list)}
+ // value={this.state.list}
+ key={indexs}
+ // onChange={this.onChange}
+ // checked={true}
+ />
+ ))
+ : null}
+
+
+
+ ))
+ : null}
+
+
+ );
+ }
+}
+
+export default connect(props => props)(CulumnModal);
diff --git a/src/pages/customer/Index.jsx b/src/pages/customer/Index.jsx
index b074192..5f2560f 100644
--- a/src/pages/customer/Index.jsx
+++ b/src/pages/customer/Index.jsx
@@ -1,15 +1,20 @@
import React from 'react';
import { connect } from 'dva';
-import { Table, Row, Col, Divider, Popconfirm, Avatar } from 'antd';
+import { Table, Row, Col, Divider, Popconfirm, Avatar, Modal, Button, Form, Input } from 'antd';
import Head from './Head';
import Edit from './Edit';
+import Modals from './Modals';
+import CulumnModals from './CulumnModal';
const Customer = props => {
const {
dispatch,
customer: { pageNumber, total },
} = props;
+ console.log(props);
+
const handleOperation = (type, record) => {
+ console.log(record);
switch (type) {
case 'editor':
dispatch({
@@ -75,18 +80,19 @@ const Customer = props => {
title: '账号',
dataIndex: 'userName',
key: 'userName',
+ width: 120,
},
{
title: 'APP身份',
dataIndex: 'customerTypeName',
key: 'customerTypeName',
- width: 120
+ width: 180,
},
{
title: '后台角色',
dataIndex: 'roleName',
key: 'roleName',
- width: 150
+ width: 150,
},
{
title: '所属栏目',
@@ -98,21 +104,33 @@ const Customer = props => {
title: '操作',
dataIndex: 'set',
key: 'set',
- width: 120,
+ width: 180,
render: (text, record, index) => (
+
-
handleOperation('editor', record)}>
- 编辑
-
-
-
handleOperation('delete', record)}
- overlayStyle={{ width: '200px' }}
- >
- 删除
-
+
+
handleOperation('editor', record)}>
+ 编辑
+
+
+
+
+
handleOperation('delete', record)}
+ overlayStyle={{ width: '200px' }}
+ >
+ 删除
+
+
+
+
+
+
+
+ {record.ifShow == 1? : ''}
+
),
},
@@ -121,7 +139,7 @@ const Customer = props => {
loading,
customer: { list, isList },
} = props;
-
+ console.log(props);
return (
<>
@@ -149,8 +167,15 @@ const Customer = props => {
>
);
};
+// export default connect(({ customer, loading, login }) => ({
+// customer,
+// loading: loading.effects['role/fetch'],
+// login
+// }))(Customer);
+
+const customerForm = Form.create()(Customer);
export default connect(({ customer, loading, login }) => ({
customer,
loading: loading.effects['role/fetch'],
login,
-}))(Customer);
+}))(customerForm);
diff --git a/src/pages/customer/Modals.jsx b/src/pages/customer/Modals.jsx
new file mode 100644
index 0000000..a989c7c
--- /dev/null
+++ b/src/pages/customer/Modals.jsx
@@ -0,0 +1,103 @@
+import React, { Component } from 'react';
+import { connect } from 'dva';
+import { Modal, Form,Input } from 'antd';
+
+@connect(({ customer }) => ({ customer }))
+ class Modals extends Component {
+ constructor (props) {
+ super(props);
+ this.state = {
+ visible: false
+ }
+ }
+
+
+
+
+ render () {
+ const { getFieldDecorator } = this.props.form;
+ const handleOk = () => {
+ const {
+ form,
+ dispatch,
+ customerId
+ } = this.props;
+ console.log(this.props);
+ form.validateFields((err, values) => {
+ console.log(values);
+ if(!err) {
+ if (dispatch) {
+ dispatch({
+ type: 'customer/fetchList',
+ payload: {
+ password: values.password,
+ customerId: customerId
+ }
+ })
+ }
+ }
+ })
+ this.setState({
+ visible: false
+ })
+ };
+
+
+
+ const formItemLayout = {
+ labelCol: {
+ xs: { span: 24 },
+ sm: { span: 8 },
+ },
+ wrapperCol: {
+ xs: { span: 24 },
+ sm: { span: 16 },
+ },
+ };
+
+ const handleSetPwd = () => {
+ this.setState({
+ visible: true
+ })
+ }
+
+ const handleCancel = e => {
+ console.log(e);
+ this.setState({
+ visible: false,
+ });
+ };
+
+
+
+
+
+
+ return (
+
+ 设置密码
+
+
+ {getFieldDecorator('password', {
+ rules: [
+ {
+ required: true,
+ message: '密码不能为空',
+ }
+ ],
+ })()}
+
+
+
+
+ )
+ }
+}
+
+export default Form.create()(Modals);
\ No newline at end of file
diff --git a/src/pages/customer/models/customer.js b/src/pages/customer/models/customer.js
index 1244f41..381860b 100644
--- a/src/pages/customer/models/customer.js
+++ b/src/pages/customer/models/customer.js
@@ -7,8 +7,12 @@ import {
getIdentity,
findByCustomer,
customerTypes,
+ SetPassword,
+ findCulumnAll,
+ updateCulumn
} from '../services/customer';
import { message } from 'antd';
+import md5 from 'blueimp-md5';
const CustomerModele = {
namespace: 'customer',
@@ -23,13 +27,14 @@ const CustomerModele = {
name: '',
phone: '',
programName: '',
+ ifShow: 0
},
},
editorData: null,
roleList: [],
identityList: [],
pageNumber: 1,
- customerTypeData: [],
+ customerTypeData: []
},
effects: {
*fetch({ payload }, { call, put }) {
@@ -38,10 +43,25 @@ const CustomerModele = {
type: 'saveList',
payload: {
data: response.data,
- pageNumber: payload.pageNumber,
+ pageNumber: payload.pageNumber
},
});
},
+
+ *fetchList({ payload }, { call, put }) {
+ console.log(payload);
+ const formData = new FormData();
+ formData.append('password', md5(payload.password));
+ formData.append('customerId', payload.customerId)
+ const res = yield call(SetPassword, formData);
+ console.log(res);
+ if (res.success) {
+ message.success('修改成功')
+ } else {
+ message.error('修改失败')
+ }
+ },
+
*addOrEditCustomer({ payload }, { call, put }) {
if (payload.isEdit) {
yield call(editCustomer, payload.data);
@@ -58,6 +78,7 @@ const CustomerModele = {
name: '',
phone: '',
programName: '',
+ ifShow: 0
},
},
});
@@ -110,9 +131,55 @@ const CustomerModele = {
payload: response,
});
},
+
+ // 查询所属栏目
+ *fetchCulunm({ payload }, { call, put }) {
+ const response = yield call(findCulumnAll, payload);
+ console.log(response)
+ let flaglist=[]
+ for(let i=0;i state.customer.pageInfo);
+ yield put({
+ type: 'fetch',
+ payload: pageInfo,
+ });
+ if (res.success) {
+ message.success('设置成功');
+ } else {
+ message.error(res.errorCode);
+ }
+ },
+
+
},
reducers: {
+ // 获取所属栏目
+ getCulunmList(state, {payload}) {
+ const {data, flaglist} = payload;
+ return {
+ ...state,
+ culumnList: data,
+ flaglist:flaglist
+ }
+ },
+
saveList(state, action) {
return {
...state,
@@ -175,6 +242,7 @@ const CustomerModele = {
name: '',
phone: '',
programName: '',
+ ifShow: 0
},
},
});
diff --git a/src/pages/customer/services/customer.js b/src/pages/customer/services/customer.js
index 6d5901f..7cd988f 100644
--- a/src/pages/customer/services/customer.js
+++ b/src/pages/customer/services/customer.js
@@ -59,3 +59,28 @@ export async function customerTypes(param){
});
}
+export async function SetPassword(params) {
+ return request(`/api/g/customer/update`, {
+ method: 'POST',
+ data: params,
+ });
+}
+
+/**
+ * 获取所属栏目
+ */
+export async function findCulumnAll() {
+ return request(`/api/g/customer/find/update/program`, {
+ method: 'GET',
+ });
+}
+
+/**
+ * 编辑摄像所属栏目
+ */
+export async function updateCulumn(params) {
+ return request(`/api/g/customer/add/update/program`, {
+ method: 'PUT',
+ data: params
+ });
+}
\ No newline at end of file
diff --git a/src/pages/statistics-order/Index.jsx b/src/pages/statistics-order/Index.jsx
index d6b83ef..778fa22 100644
--- a/src/pages/statistics-order/Index.jsx
+++ b/src/pages/statistics-order/Index.jsx
@@ -1,6 +1,6 @@
import React from 'react';
import { connect } from 'dva';
-import { Input, Radio, Select, Button, message, DatePicker } from 'antd';
+import { Input, Radio, Select, Button, message, DatePicker, Row, Col, Icon } from 'antd';
import moment from 'moment';
import Table from './Table';
@@ -15,12 +15,13 @@ class StatisticsOrder extends React.Component {
tabActiveKey: 'list',
isNew: true,
reason: '',
+ visible: true,
};
}
-
- componentWillMount=()=>{
+
+ componentWillMount = () => {
this.handleReset();
- }
+ };
handleSearch = () => {
const {
@@ -28,7 +29,7 @@ class StatisticsOrder extends React.Component {
statisticsOrder: { pageInfo },
} = this.props;
console.log(this.props);
- this.props.statisticsOrder.pageInfo.pageNumber = 1
+ this.props.statisticsOrder.pageInfo.pageNumber = 1;
dispatch({
type: 'statisticsOrder/fetchList',
payload: pageInfo,
@@ -42,7 +43,7 @@ class StatisticsOrder extends React.Component {
type: 'statisticsOrder/getCameraGroup',
payload: {
cameraGroupName: '',
- value: ''
+ value: '',
},
});
dispatch({
@@ -57,7 +58,7 @@ class StatisticsOrder extends React.Component {
example: {
startTime: '',
overTime: '',
- blurry: '',
+ customer: '',
customerName: '',
orderNo: '',
programName: '',
@@ -205,77 +206,209 @@ class StatisticsOrder extends React.Component {
const {
statisticsOrder: { pageInfo, cameraGroup },
} = this.props;
- const { tabActiveKey, isNew, reason } = this.state;
+ const { tabActiveKey, isNew, reason, visible } = this.state;
return (
-
-
-
搜索:
-
this.handleSearchKey(e.target.value, 'blurry')}
- placeholder="请输入订单号|摄像姓名"
- style={{ width: 250 }}
- value={pageInfo.example.blurry}
- />
-
开始时间:
-
-
结束时间:
-
- {/*
订单时间:
-
*/}
-
分组:
-
+
+ )}
{detail.reason}
+
+
+
+
+ {detail.cameraNameLists}
+
diff --git a/src/pages/system/Edit.jsx b/src/pages/system/Edit.jsx
new file mode 100644
index 0000000..688f7b5
--- /dev/null
+++ b/src/pages/system/Edit.jsx
@@ -0,0 +1,152 @@
+import React from 'react';
+import { connect } from 'dva';
+import { Form, Descriptions, Divider,Radio,Input ,Row ,Button} from 'antd';
+
+class Edit extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {};
+ }
+
+ handleSave = () => {
+ const {
+ dispatch,
+ system: { orderMessage },
+ form,
+ } = this.props;
+ console.log(this.props);
+ form.validateFields((error, row) => {
+ if (error) {
+ return;
+ }
+ dispatch({
+ type: 'system/restoreOrder',
+ payload: {
+ ...row,
+ caSystemId: orderMessage.caSystemId,
+ content: orderMessage.content
+ }
+ })
+ })
+ }
+
+ handleCancle = () => {
+ const {
+ dispatch,
+ system: { pageInfo },
+ } = this.props;
+ dispatch({
+ type: 'system/fetchList',
+ payload: pageInfo,
+ });
+ };
+ render() {
+ const {
+ form,
+ system: { orderMessage },
+ } = this.props;
+ console.log(this.props);
+ const { getFieldDecorator, getFieldValue } = form;
+
+ const status = [
+ '已预约',
+ '待完成',
+ '已开始',
+ '已完成',
+ '已评价',
+ '已取消',
+ '已锁定',
+ '开始执行',
+ '确认开始',
+ '执行完毕',
+ '用户已评',
+ '摄像已评',
+ '双方已评',
+ '摄像师提交素材',
+ '编导确认提交材料',
+ '订单结束',
+ ];
+ const formItemLayout = {
+ labelCol: {
+ xs: { span: 24 },
+ sm: { span: 4 },
+ },
+ wrapperCol: {
+ xs: { span: 24 },
+ sm: { span: 16 },
+ },
+ };
+
+
+ return (
+
+
+ {`《${orderMessage.programName}》`}
+ {`订单状态:${
+ status[Number(orderMessage.status)]
+ }`}
+
+
+ {orderMessage.orderNo}
+ {orderMessage.cameraGroupName}
+ {orderMessage.createTime}
+ {orderMessage.detailedAddress}
+
+ {orderMessage.name}
+
+
+ {orderMessage.beginTime}
+
+
+
+
+
+ {getFieldDecorator('state', {
+ initialValue: true,
+ rules: [
+ {
+ required: true,
+ message: '请选择异常处理',
+ },
+ ],
+ })(
+
+ 归为正常
+ 归为异常
+ ,
+ )}
+
+
+ {getFieldDecorator('content', {
+ initialValue: '',
+ rules: [
+ {
+ required: true,
+ message: '请填写处理意见',
+ },
+ ],
+ })()}
+
+
+
+
+
+
+
+ );
+ }
+}
+
+const EditForm = Form.create()(Edit);
+export default connect(props => props)(EditForm);
diff --git a/src/pages/system/Index.jsx b/src/pages/system/Index.jsx
new file mode 100644
index 0000000..c952d7d
--- /dev/null
+++ b/src/pages/system/Index.jsx
@@ -0,0 +1,268 @@
+import React, { Component } from 'react';
+import {
+ Input,
+ Radio,
+ Select,
+ Button,
+ message,
+ DatePicker,
+ Row,
+ Col,
+ Table,
+ Divider,
+ Popconfirm,
+} from 'antd';
+import { connect } from 'dva';
+import Edit from './Edit';
+
+@connect(({ system }) => ({ system }))
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ visibles: false,
+ reason: '',
+ };
+ }
+
+ render() {
+ const {
+ dispatch,
+ system: { list, pageInfo, totalElements ,tabActiveKey},
+ } = this.props;
+ console.log(this.props);
+
+ // 表格
+ const columns = [
+ {
+ title: '订单号',
+ dataIndex: 'orderNo',
+ key: 'orderNo',
+ },
+ {
+ title: '摄像',
+ dataIndex: 'cameraName',
+ key: 'cameraName',
+ },
+ {
+ title: '通知内容',
+ dataIndex: 'content',
+ key: 'content',
+ },
+ {
+ title: '处理意见',
+ dataIndex: 'opinion',
+ key: 'opinion',
+ },
+ {
+ title: '状态',
+ dataIndex: 'state',
+ key: 'state',
+ render: value => {['', '处理中', '已处理'][Number(value)]},
+ },
+ {
+ title: '通知时间',
+ dataIndex: 'createTime',
+ key: 'createTime',
+ },
+ {
+ title: '操作',
+ dataIndex: 'set',
+ key: 'set',
+ render: (text, record, index) => (
+
+
handleOperation('dispose',record)}>处理
+
+
handleOperation('delete', record)}
+ overlayStyle={{ width: '200px' }}
+ >
+ 删除
+
+
+ ),
+ },
+ ];
+
+ const handleOperation = (type, record) => {
+ switch (type) {
+ case 'dispose':
+ dispatch({
+ type: 'system/disposeOrder',
+ payload: record.caSystemId,
+ });
+ break;
+ case 'delete':
+ dispatch({
+ type: 'system/deleteAbnormalOrder',
+ payload: record.caSystemId,
+ });
+ break;
+ }
+ };
+
+ // 分页 刷新页面 获取数据
+ const handlePage = page => {
+ pageInfo.pageNumber = page;
+ dispatch({
+ type: 'system/fetchList',
+ payload: pageInfo,
+ });
+ };
+
+ // 分页
+ const pagination = {
+ current: pageInfo.pageNumber,
+ pageSize: pageInfo.pageSize,
+ total: totalElements,
+ onChange: handlePage,
+ size: 'middle',
+ showTotal: totalCount => `共 ${totalCount} 条数据`,
+ };
+
+ // 搜索
+ const handleSearchKey = (value, key) => {
+ const {
+ dispatch,
+ system: { pageInfo },
+ } = this.props;
+ dispatch({
+ type: 'system/updatePageInfo',
+ payload: { pageInfo, value, key },
+ });
+ };
+
+ const handleInput = e => {
+ this.setState({ reason: e.target.value });
+ };
+
+ // 开始结束时间
+ const onStartChange = (date, dateStr) => handleSearchKey(dateStr, 'startTime');
+ const onEndChange = (date, dateStr) => handleSearchKey(dateStr, 'overTime');
+
+ // 查询
+ const handleSearch = () => {
+ const {
+ dispatch,
+ system: { pageInfo },
+ } = this.props;
+ console.log(this.props);
+ this.props.system.pageInfo.pageNumber = 1;
+ dispatch({
+ type: 'system/fetchList',
+ payload: pageInfo,
+ });
+ };
+
+ // 重置
+ const handleReset = () => {
+ const { dispatch } = this.props;
+ dispatch({
+ type: 'system/resetState',
+ });
+
+ dispatch({
+ type: 'system/fetchList',
+ payload: {
+ pageNumber: 1,
+ pageSize: 10,
+ example: {
+ startTime: '',
+ overTime: '',
+ cameraName: '',
+ content: '',
+ orderNo: '',
+ state: null,
+ },
+ },
+ });
+ };
+
+ return (
+
+ {tabActiveKey == 'list' ? (
+
+
+ 订单号:
+ handleSearchKey(e.target.value, 'orderNo')}
+ placeholder="请输入订单号"
+ style={{ width: 180 }}
+ value={pageInfo.example.orderNo}
+ />
+
+
+ 摄像名称:
+ handleSearchKey(e.target.value, 'cameraName')}
+ placeholder="请输入摄像名称"
+ style={{ width: 180 }}
+ value={pageInfo.example.cameraName}
+ />
+
+
+ 状态:
+
+
+
+
+ 开始时间:
+
+ 结束时间:
+
+
+
+
+
+
+
+ ) : null}
+
+ {tabActiveKey == 'list' ? (
{
+ if (idx % 2 === 1) return 'bgRow';
+ }}
+ bordered
+ />) : (
+
+ )}
+
+
+ );
+ }
+}
+
+export default Index;
diff --git a/src/pages/system/models/System.js b/src/pages/system/models/System.js
new file mode 100644
index 0000000..8750a32
--- /dev/null
+++ b/src/pages/system/models/System.js
@@ -0,0 +1,178 @@
+import { message } from 'antd';
+import { list ,disposeOrder,delectException,restoreOrder} from '../services/System';
+import moment from 'moment';
+
+const SystemModel = {
+ namespace: 'system',
+ state: {
+ list: [],
+ orderMessage: {},
+ tabActiveKey: 'list',
+ totalElements: 0,
+ pageInfo: {
+ pageNumber: 1,
+ pageSize: 10,
+ example: {
+ startTime: String(
+ moment()
+ .locale('zh-cn')
+ .subtract(20, 'days')
+ .format('YYYY-MM-DD HH:mm:ss'),
+ ),
+ overTime: String(
+ moment()
+ .locale('zh-cn')
+ .format('YYYY-MM-DD HH:mm:ss'),
+ ),
+ cameraName: '',
+ content: '',
+ orderNo: '',
+ state: null,
+ },
+ },
+ },
+
+ effects: {
+ // 获取table
+ *fetchList({ payload }, { call, put }) {
+ const response = yield call(list, payload);
+ console.log(response);
+ yield put({
+ type: 'getList',
+ payload: {
+ data: response.data,
+ pageNumber: payload.pageNumber,
+ },
+ });
+ },
+
+ // 处理
+ *disposeOrder({ payload }, { call, put }) {
+ const response = yield call(disposeOrder, payload);
+ yield put({
+ type: 'getOrderMessage',
+ payload: response.data,
+ });
+ },
+
+ // 删除
+ *deleteAbnormalOrder({ payload }, { call, put, select }) {
+ const response = yield call(delectException, payload);
+ const pageInfo = yield select(state => state.system.pageInfo);
+ yield put({
+ type: 'fetchList',
+ payload: pageInfo,
+ });
+ if (response.success) {
+ message.success('删除成功');
+ }
+ },
+
+ // 恢复预约单
+ *restoreOrder({ payload }, { call, put, select }) {
+ const response = yield call(restoreOrder, payload);
+ const pageInfo = yield select(state => state.system.pageInfo);
+ yield put({
+ type: 'fetchList',
+ payload: pageInfo,
+ });
+ if (response.success) {
+ message.success('恢复预约单成功');
+ }
+ },
+ },
+
+ reducers: {
+ getList(state, { payload }) {
+ const { data } = payload;
+ return {
+ ...state,
+ list: data.content,
+ tabActiveKey: 'list'
+ };
+ },
+
+ // 处理
+ getOrderMessage(state, { payload }) {
+ return {
+ ...state,
+ orderMessage: payload,
+ tabActiveKey: 'dispose',
+ };
+ },
+
+ updatePageInfo(state, { payload }) {
+ const { pageInfo } = payload;
+ pageInfo.example[payload.key] = payload.value;
+ return { ...state, pageInfo };
+ },
+
+ resetState(state) {
+ return {
+ ...state,
+ list: [],
+ orderMessage: {},
+ tabActiveKey: 'list',
+ totalElements: 0,
+ pageInfo: {
+ pageNumber: 1,
+ pageSize: 10,
+ example: {
+ startTime: String(
+ moment()
+ .locale('zh-cn')
+ .subtract(20, 'days')
+ .format('YYYY-MM-DD HH:mm:ss'),
+ ),
+ overTime: String(
+ moment()
+ .locale('zh-cn')
+ .format('YYYY-MM-DD HH:mm:ss'),
+ ),
+ cameraName: '',
+ content: '',
+ orderNo: '',
+ state: null,
+ },
+ },
+ }
+ }
+ },
+
+ subscriptions: {
+ setup({ dispatch, history }) {
+ return history.listen(({ pathname }) => {
+ if (pathname === '/o/system-inform') {
+ dispatch({
+ type: 'fetchList',
+ payload: {
+ pageNumber: 1,
+ pageSize: 10,
+ example: {
+ startTime: String(
+ moment()
+ .locale('zh-cn')
+ .subtract(20, 'days')
+ .format('YYYY-MM-DD HH:mm:ss'),
+ ),
+ overTime: String(
+ moment()
+ .locale('zh-cn')
+ .format('YYYY-MM-DD HH:mm:ss'),
+ ),
+ cameraName: '',
+ content: '',
+ orderNo: '',
+ state: null,
+ },
+ },
+ });
+ }
+ });
+ },
+ },
+
+
+};
+
+export default SystemModel;
\ No newline at end of file
diff --git a/src/pages/system/services/System.js b/src/pages/system/services/System.js
new file mode 100644
index 0000000..d55ec8c
--- /dev/null
+++ b/src/pages/system/services/System.js
@@ -0,0 +1,46 @@
+import { request } from '@/utils/request';
+
+/**
+ * 获取列表table
+ * @param {*} params
+ */
+export async function list(params) {
+ return request(`/api/o/system-inform/list`, {
+ method: 'POST',
+ data: params,
+ });
+}
+
+/**
+ * 处理
+ * @param {*} params
+ */
+export async function disposeOrder(params) {
+ return request(`/api/o/system-inform/${params}`, {
+ method: 'GET',
+ data: params,
+ });
+}
+
+/**
+ * 删除
+ * @param {*} params
+ */
+export async function delectException(params) {
+ return request(`/api/o/system-inform/${params}`, {
+ method: 'DELETE',
+ data: params,
+ });
+}
+
+/**
+ * 恢复预约单
+ * @param {*} params
+ */
+export async function restoreOrder(params) {
+ return request(`/api/o/system-inform`, {
+ method: 'PUT',
+ data: params,
+ });
+}
+
--
Gitee