Browse Source

Merge branch 'develop' of http://120.27.195.166:3000/chenglb/PMS_Frontend_v1.0.0.git into develop

tags/PMS_V1.0.0_Alpha5
chenglb 1 year ago
parent
commit
0c8a8304c1
  1. 7
      src/components/VideoPlay/index.scss
  2. 6
      src/components/form/FormTreeSelectNew/index.jsx
  3. 2
      src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingFalseAlarms/index.scss
  4. 3
      src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingFalseAlarms/loadable.jsx
  5. 6
      src/pages/NewEnergy/ChargeStationMgm/index.jsx
  6. 21
      src/pages/NewEnergy/ChargeStationMgm/index.scss
  7. 355
      src/pages/NewEnergy/ChargeStationMgm/loadable.jsx
  8. 165
      src/pages/NewEnergy/ChargingMgm/BillingRule/index.scss
  9. 255
      src/pages/NewEnergy/ChargingMgm/BillingRule/loadable.jsx
  10. 162
      src/pages/NewEnergy/ChargingMgm/OrderRuleMgm/index.scss
  11. 531
      src/pages/NewEnergy/ChargingMgm/OrderRuleMgm/loadable.jsx
  12. 1097
      src/pages/NewEnergy/RealtimeMonitor/ChargerMonitor/loadable.jsx
  13. 238
      src/pages/NewEnergy/RecordsInquiry/Appointment/index.scss
  14. 89
      src/pages/NewEnergy/RecordsInquiry/Appointment/loadable.jsx
  15. 238
      src/pages/NewEnergy/RecordsInquiry/Charge/index.scss
  16. 154
      src/pages/NewEnergy/RecordsInquiry/Charge/loadable.jsx
  17. 4
      src/pages/NewEnergy/RecordsInquiry/Unlocking/index.jsx
  18. 238
      src/pages/NewEnergy/RecordsInquiry/Unlocking/index.scss
  19. 97
      src/pages/NewEnergy/RecordsInquiry/Unlocking/loadable.jsx
  20. 238
      src/pages/NewEnergy/RecordsInquiry/Violation/index.scss
  21. 159
      src/pages/NewEnergy/RecordsInquiry/Violation/loadable.jsx
  22. 2
      src/pages/NewEnergy/index.jsx
  23. 8
      src/pages/OffPeak/OffPeakTimeMgm/ManagementTime/loadable.jsx
  24. 8
      src/pages/OffPeak/OffPeakTimeMgm/RuleDetail/loadable.jsx
  25. 82
      src/pages/OutRoadMgm/OutRoadOverview/loadable.jsx
  26. 6
      src/router/router.config.js
  27. 32
      src/services/NewEnergy/ChargeStationMgm.js
  28. 41
      src/services/NewEnergy/chargingMgm.js
  29. 7
      src/services/NewEnergy/index.js
  30. 55
      src/services/NewEnergy/recordsInquiry.js
  31. 27
      src/services/OutRoadMgm/OutRoadOverview.js

7
src/components/VideoPlay/index.scss

@ -184,3 +184,10 @@
min-height: 400px;
}
}
.video-play-wrap {
.rm-video {
width: 100%;
height: 100%;
min-height: 400px;
}
}

6
src/components/form/FormTreeSelectNew/index.jsx

@ -13,6 +13,11 @@ export default function FormTreeSelectNew(props) {
placeholder = "请选择",
value = [],
treeData = [],
fieldNames={
label: "name",
value: "id",
children: "children",
},
disabled = false,
className = "",
maxHeight = 400,
@ -174,6 +179,7 @@ export default function FormTreeSelectNew(props) {
allowClear={allowClear}
value={value}
disabled={disabled}
fieldNames={fieldNames}
dropdownStyle={{ maxHeight: maxHeight, overflow: "auto" }}
treeData={data}
placeholder={placeholder}

2
src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingFalseAlarms/index.scss

@ -5,7 +5,7 @@ $color-user-list-bg : var(--color-user-list-bg);
$color-text : var(--color-text);
$color-primary : var(--color-primary);
.parkaly-box {
.parkfalse-box {
display: flex;
padding-top: 10px;
width: 100%;

3
src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingFalseAlarms/loadable.jsx

@ -379,7 +379,8 @@ function ParkingFalseAlarms() {
placeholder="请选择"
options={[
{ value: "0", label: "全部" },
{ value: "1", label: "地磁设备" }
{ value: "1", label: "地磁设备" },
{ value: "2", label: "高位视频" },
]}
value={formData.device_type}
onChange={(v) =>

6
src/pages/NewEnergy/ChargeStationMgm/index.jsx

@ -0,0 +1,6 @@
import React from "react"
import loadable from "@loadable/component"
import { LoadingImg } from "@/components"
const Appointment = loadable(() => import("./loadable"))
export default (pros) => <Appointment {...pros} fallback={<LoadingImg />} />

21
src/pages/NewEnergy/ChargeStationMgm/index.scss

@ -0,0 +1,21 @@
.add-station-modal {
.add-station-body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.row {
width: 100%;
margin: 10px 0;
}
.cc-form-tree {
margin-bottom: 0;
}
.cc-form-content,.form-select-single-content {
flex: auto;
}
.cc-form-name,.form-select-single-name {
width: 100px;
}
}
}

355
src/pages/NewEnergy/ChargeStationMgm/loadable.jsx

@ -0,0 +1,355 @@
import React, { useState, useRef, useEffect } from "react";
import {
message,
Modal,
Button,
Cascader
} from "antd";
import ajax from "@/services";
import { useSessionStorageState, useSetState } from "ahooks"
import { TableModule, FormInput, FormSelect, FormTreeSelectNew } from "@/components";
import "./index.scss";
function Appointment() {
//
const [detailVisible, setDetailVisible] = useState(false);
//
const [tableData, setTableData] = useState([]);
//
const [total, setTotal] = useState(0);
//
const [detailData, setDetailData] = useState({});
//
const [siteList, setSiteList] = useState([]);
//
const [areaList, setAreaList] = useState([]);
//
const [operatorList, setOperatorList] = useState([]);
//
const initAdd = {
name: "",
code: "",
address: "",
site_type: "",
area: "",
operator: ""
}
const [addFormData, setAddFormData] = useSetState(initAdd);
const [formData, setFormData] = useSetState({});
//
const initFormData = {
operator: "0",
rule_name: "",
};
const columns = [
{
title: "充电站名称",
dataIndex: "name",
key: "name",
align: "center",
},
{
title: "充电站编码",
dataIndex: "code",
key: "code",
align: "center",
},
{
title: "站点类型",
dataIndex: "site_type",
key: "site_type",
align: "center",
},
{
title: "所属区域",
dataIndex: "area",
key: "area",
align: "center",
},
{
title: "详细地址",
dataIndex: "address",
key: "address",
align: "center",
},
{
title: "车位总数",
dataIndex: "count",
key: "count",
align: "center",
},
{
title: "商户名称",
dataIndex: "operator",
key: "operator",
align: "center",
},
{
title: "站点状态",
dataIndex: "site_status",
key: "site_status",
align: "center",
},
{
title: "操作",
dataIndex: "operation",
key: "operation",
align: "center",
fixed: "right",
width: 100,
render: (text, record, index) => {
return (
<>
<Button type="primary" onClick={() => openModal(index, record)}>
详情
</Button>
</>
)
},
},
];
const formSearch = [
{
name: "name",
type: "Input",
label: "充电站名称",
placeholder: "请输入充电站名称",
},
{
name: "area",
type: "TreeSelect",
defaultValue: "0",
label: "所属区域",
placeholder: "请选择所属区域",
},
{
name: "site_status",
type: "Select",
label: "站点状态",
options: [
{ value: "0", label: "全部" },
...siteList
],
defaultValue: "0",
placeholder: "请选择站点状态",
},
{
name: "operator",
type: "Select",
label: "商户名称",
defaultValue: "0",
placeholder: "请选择商户名称",
},
];
const init = () => {
getSiteStatus()
getAreaList()
getAllOperator()
}
//
const getSiteStatus = () => {
ajax.getSiteStatus().then((res) => {
const { status, data } = res
if (status === 20000) {
if (data && data.length) {
data.shift()
setSiteList(data);
}
} else {
message.error(res.message)
}
});
}
//
const getAreaList = () => {
ajax.getAreaTree().then((res) => {
const { status, data } = res
if (status === 20000) {
if (data && data.length) {
data.shift()
setAreaList(data);
}
}
}).catch((err) => {
console.error(err);
});
}
//
const getAllOperator = () => {
ajax.getAllOperator().then((res) => {
const { status, data } = res
if (status === 20000) {
if (data && data.length) {
data.shift()
setOperatorList(data);
}
}
}).catch((err) => {
console.error(err);
});;
}
//
const openModal = (index, record) => {
setDetailData(record)
setDetailVisible(true);
}
//
const search = (params) => {
ajax.getStationList(params).then((res) => {
if (res.status === 20000) {
setFormData(params)
setTableData(res.data);
setTotal(res.total);
} else {
message.error(res.message)
}
});
}
//
const handelAdd = () => {
setAddFormData(initAdd)
setDetailVisible(true)
}
const handelOk = () => {
ajax.addStation(addFormData).then((res) => {
if (res.status === 20000) {
message.success("新增成功")
setDetailVisible(false);
setAddFormData(initAdd)
search(formData)
} else {
message.error(res.message)
}
});
}
useEffect(() => {
init()
}, [])
return (
<>
<TableModule
showSerial={true}
isExport={false}
diyButton={
<Button
type="primary"
onClick={handelAdd}
>
新增
</Button>
}
columns={columns}
tableData={tableData}
formSearch={formSearch}
pagename="充电站管理"
pageName={'chargeStationMgm'}
initFormData={initFormData}
total={total}
search={search}
exportUrl="/api/bpm/record/get_record_export"
/>
<Modal
title="添加充电站"
open={detailVisible}
width={500}
className="add-station-modal"
onCancel={() => {
setDetailVisible(false);
}}
onOk={handelOk}
destroyOnClose
>
<div className="add-station-body">
<div className="row">
<FormInput
yisaLabel="充电站名称"
placeholder="请输入充电站名称"
isShowAfterIcon={false}
value={addFormData.name}
onChange={e => { setAddFormData({ name: e.target.value }) }}
/>
</div>
<div className="row">
<FormInput
yisaLabel="充电站编码"
placeholder="请输入充电站编码"
isShowAfterIcon={false}
value={addFormData.code}
onChange={e => { setAddFormData({ code: e.target.value }) }}
/>
</div>
<div className="row">
<FormInput
yisaLabel="详细地址"
placeholder="请输入详细地址"
isShowAfterIcon={false}
value={addFormData.address}
onChange={e => { setAddFormData({ address: e.target.value }) }}
/>
</div>
<div className="row">
<FormSelect
yisaLabel="站点类型"
placeholder="请选择站点类型"
yisaData={siteList}
value={addFormData.site_type}
onChange={e => { setAddFormData({ site_type: e }) }}
/>
</div>
<div className="row">
<FormTreeSelectNew
yisaLabel="所属区域"
labelPosition="left"
placeholder="请选择所属区域"
value={addFormData.area || null}
fieldNames={{
label: "name",
value: "id",
children: "children",
}}
treeData={areaList}
multiple={false}
isBayonet={true}
onChange={(e) => { setAddFormData({ area: e }) }}
/>
{/* <Cascader
options={areaList}
defaultValue={addFormData.area}
placeholder="请选择区域"
expandTrigger="hover"
changeOnSelect
fieldNames={{
label: "name",
value: "id",
children: "children",
}}
onChange={cascaderChange}
/> */}
</div>
<div className="row">
<FormSelect
yisaLabel="商户名称"
placeholder="请选择商户名称"
yisaData={operatorList}
value={addFormData.operator}
onChange={e => { setAddFormData({ operator: e }) }}
/>
</div>
</div>
</Modal>
</>
);
}
export default Appointment;

165
src/pages/NewEnergy/ChargingMgm/BillingRule/index.scss

@ -171,68 +171,113 @@ $color-primary: var(--color-primary);
border-color: var(--color-border);
}
// .yisa-table {
// width: 100%;
// .ant-table-thead {
// th {
// background: var(--color-table-header-bg) !important;
// }
// }
// .ant-table-tbody {
// td {
// background: var(--color-table-body-bg) !important;
// border-bottom-color: var(--color-table-border-bottom-color);
// }
// tr:nth-child(even) {
// td {
// background: var(--color-table-body-bg-nth-child-even) !important;
// }
// }
// tr:nth-child(odd) {
// td {
// background: var(--color-table-body-bg-nth-child-even) !important;
// }
// }
// }
// }
.totalModal{
.ant-modal-footer{
display: none;
.totalModal {
.ruleTitle {
font-size: 16px;
font-weight: 700;
color: #ffffff;
}
position: absolute;
top: 40px;
right: 174px;
}
.ltc-item-img {
width: 390px;
height: 300px;
border: 1px solid;
background: #6565656b;
margin-right: 20px !important;
img {
height: 295px;
width: 387px;
// object-fit: contain;
.ant-modal-content{
width: 796px;
}
.modal-form{
margin: 20px 0 0 0;
.yisa-search{
margin-bottom: 20px;
label{
color: #eeeff1;
}
.ant-input-textarea-show-count:after{
position: absolute;
bottom: 19%;
right: 7%;
}
textarea{
position: relative;
}
}
}
.ant-modal-footer{
display: flex;
justify-content: center;
.ant-btn{
width: 88px;
height: 35px;
color: #fff;
border: none;
border-radius: 4px;
}
.ant-btn:last-child{
background: #409eff;
}
}
}
.hanleHistoyModal{
max-height: 700px;
overflow: auto;
}
.hanleHistoyModal::-webkit-scrollbar {
width: 5px;
}
.hanleHistoyModal::-webkit-scrollbar-thumb {
background-color: #9da2ab;
border-radius: 10px;
}
.modal-img{
img{
width: 200px;
height: 200px;
.detail-Modal{
.ruleTitle {
font-size: 16px;
font-weight: 700;
color: #ffffff;
}
.ltc-content {
display: flex;
flex-wrap: wrap;
margin: auto;
padding: 20px;
color: #ffffff;
.ltc-item {
font-size: 14px;
margin: 6px 12px 6px 0;
display: inline-flex;
flex: 1;
//width: 470px;
.new-item {
display: inline-block;
width: 120px;
height: 32px;
line-height: 32px;
background: rgba(150, 161, 192, 0.24);
text-align: center;
}
.new-value {
display: inline-block;
width: 320px;
height: 32px;
line-height: 32px;
text-align: center;
background: #3E4557;
box-shadow: 0px 3px 8px 0px rgba(0, 0, 0, 0.12);
}
.ltc-item-input {
display: inline-block;
width: 200px;
}
div {
width: 150px;
}
}
.last-row{
width: 100%;
display: flex;
flex-direction: column;
.rule-description{
.new-item{
line-height: 96px;
height: 96px;
}
.new-value{
width: 780px;
line-height: 96px;
height: 96px;
word-wrap:break-word
}
}
}
}
}

255
src/pages/NewEnergy/ChargingMgm/BillingRule/loadable.jsx

@ -18,55 +18,67 @@ import {
import { dictionary } from "@/config/common";
import ajax from "@/services";
import { TableModule } from "@/components";
import moment from 'moment'
import "./index.scss";
const { TextArea } = Input;
function BillingRule() {
//
const initFormData = {
operator_id: "0",
rule_name: "",
};
const params ={
operator_id:'',
rule_name:'',
rule_code:'',
rule_description:'',
time:moment().format("YYYY-MM-DD HH:mm:ss"),
username:''
}
// or
const [modalData, setModalData] = useState(params)
//
const [detailVisible, setDetailVisible] = useState(false);
//
const [tableData, setTableData] = useState([]);
//
const [total, setTotal] = useState(0);
//
const [detailData, setDetailData] = useState({});
//
const initFormData = {
operator: "0",
rule_name: "",
};
const [operatorOption, setOperatorOption] = useState([])
const [ruleDetailVisible, setRuleDetailVisible] = useState(false)
const [detailsData, setDetailsData] = useState({})
const tableRef = useRef(null)
const columns = [
{
title: "运营商名称",
dataIndex: "operator",
key: "operator",
dataIndex: "operator_name",
key: "operator_name",
align: "center",
},
{
title: "规则名称",
dataIndex: "plate",
key: "plate",
dataIndex: "rule_name",
key: "rule_name",
align: "center",
},
{
title: "规则编码",
dataIndex: "plate_color",
key: "plate_color",
dataIndex: "rule_code",
key: "rule_code",
align: "center",
},
{
title: "创建人",
dataIndex: "berth_id",
key: "berth_id",
dataIndex: "creator",
key: "creator",
width: 100,
align: "center",
},
{
title: "创建时间",
dataIndex: "in_time",
key: "in_time",
dataIndex: "create_time",
key: "create_time",
align: "center",
},
{
@ -79,9 +91,9 @@ function BillingRule() {
render: (text, record, index) => {
return (
<>
<Button type="primary" onClick={() => openModal(index, record)}>
<a type="primary" onClick={() => openModal(index, record)}>
详情
</Button>
</a>
</>
)
@ -91,11 +103,12 @@ function BillingRule() {
const formSearch = [
{
name: "operator",
name: "operator_id",
type: "Select",
label: "商名称",
label: "运营商名称",
defaultValue: "0",
placeholder: "请选择商户名称",
placeholder: "请选择运营商名称",
options:operatorOption.length ? operatorOption : [{value:"0",label:'全部'}]
},
{
name: "rule_name",
@ -107,21 +120,38 @@ function BillingRule() {
name: "timePeriod",
type: "RangePicker",
label: "时间段",
defaultValue: [moment().subtract(1,"months"), moment()]
},
];
//
const getAllOperator =() => {
ajax.getOperatorList().then((res) => {
if (res.status === 20000) {
setOperatorOption(res.data);
}
});
}
//
const openModal = (index, record) => {
setDetailData(record)
setDetailVisible(true);
setDetailsData(record)
setRuleDetailVisible(true);
}
//
const search = (params) => {
ajax.getParkingList(params).then((res) => {
console.log("params",params);
let data = {
...params,
type:1
}
ajax.getRegularList(data).then((res) => {
if (res.status === 20000) {
setTableData(res.data.list);
setTotal(res.data.total);
setModalData({
...modalData,
username:res.data.username,
})
} else {
message.error(res.message)
}
@ -129,9 +159,43 @@ function BillingRule() {
}
const handelAdd = () => {
setModalData({
...params,
username:modalData?.username
})
setDetailVisible(true)
}
// ok
const handleConfirm = () => {
if(!modalData?.operator_id){
message.warning("运营商名称不能为空")
return
}else if(!modalData?.rule_name){
message.warning("规则名称不能为空")
return
}else if(!modalData?.rule_code){
message.warning("规则编码不能为空")
return
}
//
ajax.addRule({...modalData,type:1}).then(res => {
if (res.status === 20000) {
message.success(res.message)
tableRef.current.fetch()
setModalData({
...params,
username:modalData?.username
})
setDetailVisible(false)
}
}).catch(err => {
console.log(err);
})
}
useEffect(() => {
getAllOperator()
},[])
return (
<>
<TableModule
@ -146,10 +210,10 @@ function BillingRule() {
</Button>
}
columns={columns}
ref={tableRef}
tableData={tableData}
formSearch={formSearch}
pagename="停车记录查询"
pageName={'billingRule'}
initFormData={initFormData}
total={total}
search={search}
@ -157,14 +221,145 @@ function BillingRule() {
/>
<Modal
open={detailVisible}
width={1500}
width={650}
className="totalModal"
onCancel={() => {
setModalData({...params,username:modalData?.username})
setDetailVisible(false);
}}
onOk={() => {
handleConfirm()
setDetailVisible(false);
}}
okText="保存"
destroyOnClose
>
<div className="ruleTitle">
<span className="font">新增规则</span>
</div>
<div className="modal-form">
<div className="yisa-search">
<em style={{marginRight:'5px',marginLeft:'-13px',color:'red'}}>*</em>
<label>运营商名称</label>
<Select
value={modalData.operator_id}
style={{ width: 660, marginLeft: 10 }}
options={operatorOption}
onChange={(v) => {setModalData({...modalData,operator_id:v})}}
/>
</div>
<div className="yisa-search" style={{marginLeft:13}}>
<em style={{marginRight:'5px',marginLeft:'-13px',color:'red'}}>*</em>
<label>规则名称</label>
<Input
placeholder="请输入名称"
value={modalData.rule_name}
style={{ width: 660, marginLeft: 10 }}
maxLength={30}
onChange={(v) => {setModalData({...modalData,rule_name:v.target.value})}}
/>
</div>
<div className="yisa-search" style={{marginLeft:13}}>
<em style={{marginRight:'5px',marginLeft:'-13px',color:'red'}}>*</em>
<label>规则编码</label>
<Input
placeholder="请输入编码"
value={modalData.rule_code}
style={{ width: 660, marginLeft: 10 }}
maxLength={30}
onChange={(v) => {setModalData({...modalData,rule_code:v.target.value})}}
/>
</div>
<div className="yisa-search" style={{marginLeft:26}}>
<em style={{marginRight:'5px',marginLeft:'-13px',color:'red'}}>*</em>
<label>创建人</label>
<Input
placeholder="请输入创建人"
value={modalData.username}
style={{ width: 660, marginLeft: 10 }}
maxLength={30}
disabled
// onChange={(v) => {setModalData({...modalData,creator:v.target.value})}}
/>
</div>
<div className="yisa-search" style={{marginLeft:12}}>
<em style={{marginRight:'5px',marginLeft:'-13px',color:'red'}}>*</em>
<label>创建时间</label>
<Input
placeholder="请输入创建时间"
value={modalData.time}
style={{ width: 660, marginLeft: 10 }}
maxLength={30}
disabled
// onChange={(v) => {setModalData({...modalData,creat_time:v.target.value})}}
/>
</div>
<div className="yisa-search" style={{display:"flex",marginLeft:13}}>
<label>规则描述</label>
<TextArea
showCount
placeholder="请输入规则描述"
value={modalData.rule_description}
style={{ width: 660,height:80, marginLeft: 7 }}
onChange={(v)=> setModalData({...modalData,rule_description:v.target.value})}
maxLength={200}
/>
</div>
</div>
</Modal>
<Modal
open={ruleDetailVisible}
width={1000}
className="detail-Modal"
footer={null}
destroyOnClose
onCancel={() => {
setRuleDetailVisible(false);
}}
>
<div className="ruleTitle">
<span className="font">新增规则</span>
</div>
<div className="ltc-content">
<div className="ltc-item">
<div className="new-item">运营商名称</div>
<div className="new-value">
{detailsData?.operator_name || "--"}
</div>
</div>
<div className="ltc-item">
<div className="new-item">规则名称</div>
<div className="new-value">
{detailsData?.rule_name || "--"}
</div>
</div>
<div className="ltc-item">
<div className="new-item">规则编码</div>
<div className="new-value">
{detailsData?.rule_code || "--"}
</div>
</div>
<div className="ltc-item">
<div className="new-item">创建人</div>
<div className="new-value">
{detailsData?.creator || "--"}
</div>
</div>
<div className="last-row">
<div className="ltc-item">
<div className="new-item">创建时间</div>
<div className="new-value">
{detailsData?.create_time || "--"}
</div>
</div>
<div className="ltc-item rule-description" >
<div className="new-item">规则描述</div>
<div className="new-value">
{detailsData?.rule_description || "--"}
</div>
</div>
</div>
</div>
</Modal>
</>
);

162
src/pages/NewEnergy/ChargingMgm/OrderRuleMgm/index.scss

@ -171,68 +171,110 @@ $color-primary: var(--color-primary);
border-color: var(--color-border);
}
// .yisa-table {
// width: 100%;
// .ant-table-thead {
// th {
// background: var(--color-table-header-bg) !important;
// }
// }
// .ant-table-tbody {
// td {
// background: var(--color-table-body-bg) !important;
// border-bottom-color: var(--color-table-border-bottom-color);
// }
// tr:nth-child(even) {
// td {
// background: var(--color-table-body-bg-nth-child-even) !important;
// }
// }
// tr:nth-child(odd) {
// td {
// background: var(--color-table-body-bg-nth-child-even) !important;
// }
// }
// }
// }
.totalModal{
.ant-modal-footer{
display: none;
.totalModal {
.ruleTitle {
font-size: 16px;
font-weight: 700;
color: #ffffff;
}
position: absolute;
top: 40px;
right: 174px;
}
.ltc-item-img {
width: 390px;
height: 300px;
border: 1px solid;
background: #6565656b;
margin-right: 20px !important;
img {
height: 295px;
width: 387px;
// object-fit: contain;
.ant-modal-content{
width: 796px;
}
.modal-form{
margin: 20px 0 0 0;
.yisa-search{
margin-bottom: 20px;
label{
color: #eeeff1;
}
.ant-input-textarea-show-count:after{
position: absolute;
bottom: 19%;
right: 7%;
}
textarea{
position: relative;
}
}
}
.ant-modal-footer{
display: flex;
justify-content: center;
.ant-btn{
width: 88px;
height: 35px;
color: #fff;
border: none;
border-radius: 4px;
}
.ant-btn:last-child{
background: #409eff;
}
}
}
.hanleHistoyModal{
max-height: 700px;
overflow: auto;
}
.hanleHistoyModal::-webkit-scrollbar {
width: 5px;
}
.hanleHistoyModal::-webkit-scrollbar-thumb {
background-color: #9da2ab;
border-radius: 10px;
}
.modal-img{
img{
width: 200px;
height: 200px;
.detail-Modal{
.ruleTitle {
font-size: 16px;
font-weight: 700;
color: #ffffff;
}
.ltc-content {
display: flex;
flex-wrap: wrap;
margin: auto;
padding: 20px;
color: #ffffff;
.ltc-item {
font-size: 14px;
margin: 6px 12px 6px 0;
display: inline-flex;
flex: 1;
//width: 470px;
.new-item {
display: inline-block;
width: 120px;
height: 32px;
line-height: 32px;
background: rgba(150, 161, 192, 0.24);
text-align: center;
}
.new-value {
display: inline-block;
width: 320px;
height: 32px;
line-height: 32px;
text-align: center;
background: #3E4557;
box-shadow: 0px 3px 8px 0px rgba(0, 0, 0, 0.12);
}
.ltc-item-input {
display: inline-block;
width: 200px;
}
div {
width: 150px;
}
}
.rule-description{
.new-item{
line-height: 96px;
height: 96px;
}
.new-value{
width: 780px;
line-height: 96px;
height: 96px;
word-wrap:break-word
}
}
}
}

531
src/pages/NewEnergy/ChargingMgm/OrderRuleMgm/loadable.jsx

@ -13,161 +13,428 @@ import {
Select,
Image,
Timeline,
Popover
Popover,
Popconfirm
} from "antd";
import { dictionary } from "@/config/common";
import ajax from "@/services";
import { TableModule } from "@/components";
import moment from 'moment'
import "./index.scss";
const { TextArea } = Input;
function OrderRuleMgm() {
//
const [detailVisible, setDetailVisible] = useState(false);
//
const [tableData, setTableData] = useState([]);
//
const [total, setTotal] = useState(0);
//
const [detailData, setDetailData] = useState({});
//
const initFormData = {
operator: "0",
const initFormData = {
operator_id: "0",
rule_name: "",
};
const params ={
operator_id:'',
rule_name:'',
rule_code:'',
rule_description:'',
time:moment().format("YYYY-MM-DD HH:mm:ss"),
username:'',
status:1,
}
// or
const [modalData, setModalData] = useState(params)
//
const [detailVisible, setDetailVisible] = useState(false);
//
const [tableData, setTableData] = useState([]);
//
const [total, setTotal] = useState(0);
const [operatorOption, setOperatorOption] = useState([])
const [ruleDetailVisible, setRuleDetailVisible] = useState(false)
const [detailsData, setDetailsData] = useState({})
const tableRef = useRef(null)
const columns = [
{
title: "运营商名称",
dataIndex: "operator_name",
key: "operator_name",
align: "center",
},
{
title: "规则名称",
dataIndex: "rule_name",
key: "rule_name",
align: "center",
},
{
title: "规则编码",
dataIndex: "rule_code",
key: "rule_code",
align: "center",
},
{
title: "创建人",
dataIndex: "creator",
key: "creator",
width: 100,
align: "center",
},
{
title: "规则状态",
dataIndex: "status",
key: "status",
width: 100,
align: "center",
render:(_,record) => {
return(
<span style={
{
color:record ?.status ? "#2ADC41" : "#EC5761"}
}
>
{record?.status ? "正常" : "停用"}</span>
)
}
},
{
title: "创建时间",
dataIndex: "create_time",
key: "create_time",
align: "center",
},
{
title: "操作",
dataIndex: "operation",
key: "operation",
align: "center",
fixed: "right",
width: 100,
render: (text, record, index) => {
return (
<div style={{display:"flex",cursor:"pointer"}}>
<div style={{color:"#3AA9FF"}} onClick={() => openModal(index, record)}>
详情
</div>
<div
style={{marginLeft:10,color:record ?.status ? "#EC5761" : "#2ADC41"}}
>
<Popconfirm
placement="left"
title={record?.status ? "是否停用该规则" : "是否启动该规则"}
onConfirm={() => { handleRuleStatus(record?.id,record?.status ? 0 : 1) }}
okText="是"
cancelText="否">
{record?.status ? "停用" : "启动"}
</Popconfirm>
</div>
</div>
)
const columns = [
{
title: "运营商名称",
dataIndex: "operator",
key: "operator",
align: "center",
},
{
title: "规则名称",
dataIndex: "plate",
key: "plate",
align: "center",
},
{
title: "规则编码",
dataIndex: "plate_color",
key: "plate_color",
align: "center",
},
{
title: "创建人",
dataIndex: "berth_id",
key: "berth_id",
width: 100,
align: "center",
},
{
title: "创建时间",
dataIndex: "in_time",
key: "in_time",
align: "center",
},
{
title: "操作",
dataIndex: "operation",
key: "operation",
align: "center",
fixed: "right",
width: 100,
render: (text, record, index) => {
return (
<>
<Button type="primary" onClick={() => openModal(index, record)}>
详情
</Button>
</>
)
},
},
];
},
];
const formSearch = [
{
name: "operator",
type: "Select",
label: "商户名称",
defaultValue: "0",
placeholder: "请选择商户名称",
},
{
name: "rule_name",
type: "Input",
label: "规则名称",
placeholder: "请输入出场收费员",
},
{
name: "timePeriod",
type: "RangePicker",
label: "时间段",
},
];
//
const openModal = (index, record) => {
setDetailData(record)
setDetailVisible(true);
}
const formSearch = [
{
name: "operator_id",
type: "Select",
label: "运营商名称",
defaultValue: "0",
placeholder: "请选择运营商名称",
options:operatorOption.length ? operatorOption : [{value:"0",label:'全部'}]
},
{
name: "rule_name",
type: "Input",
label: "规则名称",
placeholder: "请输入出场收费员",
},
{
name: "timePeriod",
type: "RangePicker",
label: "时间段",
defaultValue: [moment().subtract(1,"months"), moment()]
},
];
//
const handleRuleStatus = (id,status) => {
ajax.updataRule({id,status}).then((res) => {
if (res.status == 20000) {
message.success(res.message)
tableRef.current.fetch()
}else{
message.success(res.message)
}
}).catch(e => {
console.log(e);
});
}
//
const search = (params) => {
ajax.getParkingList(params).then((res) => {
//
const getAllOperator =() => {
ajax.getOperatorList().then((res) => {
if (res.status === 20000) {
setTableData(res.data.list);
setTotal(res.data.total);
} else {
message.error(res.message)
setOperatorOption(res.data);
}else{
setOperatorOption([])
}
}).catch(e => {
console.log(e);
});
}
//
const openModal = (index, record) => {
setDetailsData(record)
setRuleDetailVisible(true);
}
const handelAdd = () => {
setDetailVisible(true)
//
const search = (params) => {
let data = {
...params,
type:2
}
ajax.getRegularList(data).then((res) => {
if (res.status === 20000) {
setTableData(res.data.list);
setTotal(res.data.total);
setModalData({
...modalData,
username:res.data.username,
})
} else {
message.error(res.message)
}
});
}
return (
<>
<TableModule
showSerial={true}
isExport={false}
diyButton={
<Button
type="primary"
onClick={handelAdd}
>
新增
</Button>
}
columns={columns}
tableData={tableData}
formSearch={formSearch}
pagename="停车记录查询"
pageName={'orderRuleMgm'}
initFormData={initFormData}
total={total}
search={search}
exportUrl="/api/bpm/record/get_record_export"
/>
<Modal
open={detailVisible}
width={1500}
className="totalModal"
onCancel={() => {
setDetailVisible(false);
}}
destroyOnClose
>
const handelAdd = () => {
setModalData({
...params,
username:modalData?.username
})
setDetailVisible(true)
}
</Modal>
</>
);
// ok
const handleConfirm = () => {
if(!modalData?.operator_id){
message.warning("运营商名称不能为空")
return
}else if(!modalData?.rule_name){
message.warning("规则名称不能为空")
return
}else if(!modalData?.rule_code){
message.warning("规则编码不能为空")
return
}
//
ajax.addRule({...modalData,type:2}).then(res => {
if (res.status === 20000) {
message.success(res.message)
tableRef.current.fetch()
setModalData({
...params,
username:modalData?.username
})
setDetailVisible(false)
}
}).catch(err => {
console.log(err);
})
}
useEffect(() => {
getAllOperator()
},[])
return (
<>
<TableModule
showSerial={true}
isExport={false}
diyButton={
<Button
type="primary"
onClick={handelAdd}
>
新增
</Button>
}
columns={columns}
ref={tableRef}
tableData={tableData}
formSearch={formSearch}
pagename="停车记录查询"
initFormData={initFormData}
total={total}
search={search}
exportUrl="/api/bpm/record/get_record_export"
/>
<Modal
open={detailVisible}
width={650}
className="totalModal"
onCancel={() => {
setModalData({...params,username:modalData?.username})
setDetailVisible(false);
}}
onOk={() => {
handleConfirm()
setDetailVisible(false);
}}
okText="保存"
destroyOnClose
>
<div className="ruleTitle">
<span className="font">新增规则</span>
</div>
<div className="modal-form">
<div className="yisa-search">
<em style={{marginRight:'5px',marginLeft:'-13px',color:'red'}}>*</em>
<label>运营商名称</label>
<Select
value={modalData.operator_id}
style={{ width: 660, marginLeft: 10 }}
options={operatorOption}
onChange={(v) => {setModalData({...modalData,operator_id:v})}}
/>
</div>
<div className="yisa-search" style={{marginLeft:13}}>
<em style={{marginRight:'5px',marginLeft:'-13px',color:'red'}}>*</em>
<label>规则名称</label>
<Input
placeholder="请输入名称"
value={modalData.rule_name}
style={{ width: 660, marginLeft: 10 }}
maxLength={30}
onChange={(v) => {setModalData({...modalData,rule_name:v.target.value})}}
/>
</div>
<div className="yisa-search" style={{marginLeft:13}}>
<em style={{marginRight:'5px',marginLeft:'-13px',color:'red'}}>*</em>
<label>规则编码</label>
<Input
placeholder="请输入编码"
value={modalData.rule_code}
style={{ width: 660, marginLeft: 10 }}
maxLength={30}
onChange={(v) => {setModalData({...modalData,rule_code:v.target.value})}}
/>
</div>
<div className="yisa-search" style={{marginLeft:26}}>
<em style={{marginRight:'5px',marginLeft:'-13px',color:'red'}}>*</em>
<label>创建人</label>
<Input
placeholder="请输入创建人"
value={modalData.username}
style={{ width: 660, marginLeft: 10 }}
maxLength={30}
disabled
// onChange={(v) => {setModalData({...modalData,creator:v.target.value})}}
/>
</div>
<div className="yisa-search" style={{marginLeft:12}}>
<em style={{marginRight:'5px',marginLeft:'-13px',color:'red'}}>*</em>
<label>创建时间</label>
<Input
placeholder="请输入创建时间"
value={modalData.time}
style={{ width: 660, marginLeft: 10 }}
maxLength={30}
disabled
// onChange={(v) => {setModalData({...modalData,creat_time:v.target.value})}}
/>
</div>
<div className="yisa-search" style={{marginLeft:12}}>
<em style={{marginRight:'5px',marginLeft:'-13px',color:'red'}}>*</em>
<label>规则状态</label>
<Select
value={modalData.status}
style={{ width: 660, marginLeft: 10 }}
options={[
{
value:1,
label:'正常'
},
{
value:0,
label:'停用'
}
]}
// onChange={(v) => {setModalData({...modalData,creat_time:v.target.value})}}
/>
</div>
<div className="yisa-search" style={{display:"flex",marginLeft:13}}>
<label>规则描述</label>
<TextArea
showCount
placeholder="请输入规则描述"
value={modalData.rule_description}
style={{ width: 660,height:80, marginLeft: 7 }}
onChange={(v)=> setModalData({...modalData,rule_description:v.target.value})}
maxLength={200}
/>
</div>
</div>
</Modal>
<Modal
open={ruleDetailVisible}
width={1000}
className="detail-Modal"
footer={null}
destroyOnClose
onCancel={() => {
setRuleDetailVisible(false);
}}
>
<div className="ruleTitle">
<span className="font">新增规则</span>
</div>
<div className="ltc-content">
<div className="ltc-item">
<div className="new-item">运营商名称</div>
<div className="new-value">
{detailsData?.operator_name || "--"}
</div>
</div>
<div className="ltc-item">
<div className="new-item">规则名称</div>
<div className="new-value">
{detailsData?.rule_name || "--"}
</div>
</div>
<div className="ltc-item">
<div className="new-item">规则编码</div>
<div className="new-value">
{detailsData?.rule_code || "--"}
</div>
</div>
<div className="ltc-item">
<div className="new-item">创建人</div>
<div className="new-value">
{detailsData?.creator || "--"}
</div>
</div>
<div className="ltc-item">
<div className="new-item">创建时间</div>
<div className="new-value">
{detailsData?.create_time || "--"}
</div>
</div>
<div className="ltc-item">
<div className="new-item">规则状态</div>
<div className="new-value">
{detailsData?.status || "--"}
</div>
</div>
<div className="ltc-item rule-description" >
<div className="new-item">规则描述</div>
<div className="new-value">
{detailsData?.rule_description || "--"}
</div>
</div>
</div>
</Modal>
</>
);
}
export default OrderRuleMgm;

1097
src/pages/NewEnergy/RealtimeMonitor/ChargerMonitor/loadable.jsx
File diff suppressed because it is too large
View File

238
src/pages/NewEnergy/RecordsInquiry/Appointment/index.scss

@ -1,238 +0,0 @@
@import "@/assets/css/mixin.scss";
$color-container-bg: var(--color-container-bg);
$color-user-list-bg: var(--color-user-list-bg);
$color-text: var(--color-text);
$color-primary: var(--color-primary);
.ant-tabs {
margin-bottom: 16px;
.ant-tabs-nav {
margin-bottom: 0 !important;
&::before {
border-bottom: 1px solid var(--color-card-line) !important;
}
}
.ant-tabs-nav-wrap {
width: 100%;
box-sizing: content-box;
.ant-tabs-nav-list {
width: 340px;
.ant-tabs-ink-bar {
height: 3px;
background-color: #00ccff;
}
.ant-tabs-tab {
flex: 1;
width: 100%;
display: flex;
justify-content: center;
padding-bottom: 10px;
text-align: center;
cursor: pointer;
font-size: 14px !important;
font-family: MicrosoftYaHei;
text-align: center;
letter-spacing: 0.7px;
}
.ant-tabs-tab-active {
div {
color: #00ccff;
}
}
}
}
}
.ant-input::-webkit-input-placeholder {
color: var(--color-placeholder);
}
.ant-input::-moz-placeholder {
color: var(--color-placeholder);
}
.right-list .ant-btn-primary {
width: 68px;
height: 30px;
background: linear-gradient(180deg, #3aa9ff, #59b7ff);
border-radius: 4px;
}
.ant-input:-ms-input-placeholder {
color: var(--color-placeholder);
}
.right-list .cc-result-flow .table-wrap .yisa-table .ant-table-thead th {
background-color: #616b83 !important;
}
.right-list .cc-result-flow .table-wrap .yisa-table .ant-table-tbody td {
background-color: #3e4557 !important;
}
.right-list .cc-result-flow .table-wrap .yisa-table .ant-table-tbody tr:nth-child(even) td {
background-color: #3e4557 !important;
}
.ant-input::placeholder {
color: var(--color-placeholder);
}
.ant-select-selection-placeholder {
color: var(--color-placeholder);
}
.ant-select-disabled.ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
background: var(--color-input-disabled-bg);
color: var(--color-placeholder);
}
.ant-select-disabled .ant-select-arrow {
color: var(--color-placeholder);
}
.ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector {
background-color: var(--color-input-disabled-bg);
color: var(--color-input-disabled-color);
cursor: not-allowed;
}
.ant-select-multiple {
.ant-select-selector {
.ant-select-selection-item {
background-color: var(--color-bg-body);
border-color: var(--color-border);
.ant-select-selection-item-remove {
color: var(--color-text);
}
}
}
}
.ant-select-arrow {
color: var(--color-text);
}
.ant-select-clear {
border-radius: 50%;
}
.ant-select-dropdown-menu {
background-color: var(--color-input-bg);
.ant-select-dropdown-menu-item {
color: var(--color-text);
&.ant-select-dropdown-menu-item-active {
color: #fff;
// background-color: var(--radio-button-bg-checked);
}
&.ant-select-dropdown-menu-item-selected {
color: #fff;
// background-color: var(--radio-button-bg-checked);
}
&:hover {
color: #fff;
// background-color: var(--radio-button-bg-checked);
}
}
}
.ant-select-selector {
background-color: var(--color-search-list-item-bg) !important;
box-shadow: none !important;
border-radius: 4px;
color: var(--color-search-list-item-value);
border-color: var(--color-search-list-item-bd) !important;
}
.ant-select-selection {
background-color: var(--color-input-bg);
box-shadow: none;
color: var(--color-text);
// border-color:var(--checkable-tag-border);
}
.ant-form-horizontal .ant-form-item-label {
label {
display: inline-block;
word-wrap: break-word;
white-space: normal;
}
}
.ant-picker {
width: 100%;
background-color: var(--color-search-list-item-bg);
border-color: var(--color-border);
}
// .yisa-table {
// width: 100%;
// .ant-table-thead {
// th {
// background: var(--color-table-header-bg) !important;
// }
// }
// .ant-table-tbody {
// td {
// background: var(--color-table-body-bg) !important;
// border-bottom-color: var(--color-table-border-bottom-color);
// }
// tr:nth-child(even) {
// td {
// background: var(--color-table-body-bg-nth-child-even) !important;
// }
// }
// tr:nth-child(odd) {
// td {
// background: var(--color-table-body-bg-nth-child-even) !important;
// }
// }
// }
// }
.totalModal{
.ant-modal-footer{
display: none;
}
position: absolute;
top: 40px;
right: 174px;
}
.ltc-item-img {
width: 390px;
height: 300px;
border: 1px solid;
background: #6565656b;
margin-right: 20px !important;
img {
height: 295px;
width: 387px;
// object-fit: contain;
}
}
.hanleHistoyModal{
max-height: 700px;
overflow: auto;
}
.hanleHistoyModal::-webkit-scrollbar {
width: 5px;
}
.hanleHistoyModal::-webkit-scrollbar-thumb {
background-color: #9da2ab;
border-radius: 10px;
}
.modal-img{
img{
width: 200px;
height: 200px;
}
}

89
src/pages/NewEnergy/RecordsInquiry/Appointment/loadable.jsx

@ -1,26 +1,13 @@
import React, { useState, useRef, useEffect } from "react";
import {
message,
Pagination,
Table,
Space,
Modal,
Button,
Tabs,
Descriptions,
Input,
Steps,
Select,
Image,
Timeline,
Popover
} from "antd";
import { dictionary } from "@/config/common";
import ajax from "@/services";
import { TableModule } from "@/components";
import "./index.scss";
const { TextArea } = Input;
function Appointment() {
//
@ -40,8 +27,8 @@ function Appointment() {
const columns = [
{
title: "用户手机号",
dataIndex: "operator",
key: "operator",
dataIndex: "phone",
key: "phone",
align: "center",
},
{
@ -52,62 +39,62 @@ function Appointment() {
},
{
title: "充电站",
dataIndex: "plate_color",
key: "plate_color",
dataIndex: "station",
key: "station",
align: "center",
},
{
title: "商户名称",
dataIndex: "berth_id",
key: "berth_id",
dataIndex: "operator",
key: "operator",
align: "center",
},
{
title: "预约开始时间",
dataIndex: "in_time",
key: "in_time",
title: "预约开始时间",
dataIndex: "pre_start_time",
key: "start_time",
align: "center",
},
{
title: "预约截至时间",
dataIndex: "in_time",
key: "in_time",
dataIndex: "pre_end_time",
key: "end_time",
align: "center",
},
{
title: "缴纳预约费用金额",
dataIndex: "in_time",
key: "in_time",
dataIndex: "pre_money",
key: "pre_money",
align: "center",
},
{
title: "缴费时间",
dataIndex: "in_time",
key: "in_time",
dataIndex: "pay_time",
key: "pay_time",
align: "center",
},
{
title: "订单状态",
dataIndex: "in_time",
key: "in_time",
dataIndex: "order_status",
key: "order_status",
align: "center",
},
{
title: "订单完结时间",
dataIndex: "in_time",
key: "in_time",
dataIndex: "finish_time",
key: "finish_time",
align: "center",
},
{
title: "预约费用退款金额",
dataIndex: "in_time",
key: "in_time",
dataIndex: "refund_money",
key: "refund_money",
align: "center",
},
{
title: "顶动感实收金额",
dataIndex: "in_time",
key: "in_time",
dataIndex: "pay_money",
key: "pay_money",
align: "center",
},
{
@ -144,7 +131,7 @@ function Appointment() {
placeholder: "请输入车牌号",
},
{
name: "charging",
name: "station",
type: "Input",
label: "充电站",
placeholder: "请输入充电站",
@ -157,12 +144,12 @@ function Appointment() {
placeholder: "请选择商户名称",
},
{
name: "timeStart",
name: "pre_time",
type: "DateRangePicker",
label: "预约开始时间",
},
{
name: "timeEnd",
name: "end_time",
type: "DateRangePicker",
label: "订单完结时间",
},
@ -176,10 +163,10 @@ function Appointment() {
//
const search = (params) => {
ajax.getParkingList(params).then((res) => {
ajax.recordsInquiry.getAppointmentList(params).then((res) => {
if (res.status === 20000) {
setTableData(res.data.list);
setTotal(res.data.total);
setTableData(res.data);
setTotal(res.total);
} else {
message.error(res.message)
}
@ -195,19 +182,19 @@ function Appointment() {
<TableModule
showSerial={true}
isExport={false}
diyButton={
<Button
type="primary"
onClick={handelAdd}
>
</Button>
}
// diyButton={
// <Button
// type="primary"
// onClick={handelAdd}
// >
//
// </Button>
// }
columns={columns}
tableData={tableData}
formSearch={formSearch}
pagename="预约订单"
pageName={'Appointment'}
pageName={'appointment'}
initFormData={initFormData}
total={total}
search={search}

238
src/pages/NewEnergy/RecordsInquiry/Charge/index.scss

@ -1,238 +0,0 @@
@import "@/assets/css/mixin.scss";
$color-container-bg: var(--color-container-bg);
$color-user-list-bg: var(--color-user-list-bg);
$color-text: var(--color-text);
$color-primary: var(--color-primary);
.ant-tabs {
margin-bottom: 16px;
.ant-tabs-nav {
margin-bottom: 0 !important;
&::before {
border-bottom: 1px solid var(--color-card-line) !important;
}
}
.ant-tabs-nav-wrap {
width: 100%;
box-sizing: content-box;
.ant-tabs-nav-list {
width: 340px;
.ant-tabs-ink-bar {
height: 3px;
background-color: #00ccff;
}
.ant-tabs-tab {
flex: 1;
width: 100%;
display: flex;
justify-content: center;
padding-bottom: 10px;
text-align: center;
cursor: pointer;
font-size: 14px !important;
font-family: MicrosoftYaHei;
text-align: center;
letter-spacing: 0.7px;
}
.ant-tabs-tab-active {
div {
color: #00ccff;
}
}
}
}
}
.ant-input::-webkit-input-placeholder {
color: var(--color-placeholder);
}
.ant-input::-moz-placeholder {
color: var(--color-placeholder);
}
.right-list .ant-btn-primary {
width: 68px;
height: 30px;
background: linear-gradient(180deg, #3aa9ff, #59b7ff);
border-radius: 4px;
}
.ant-input:-ms-input-placeholder {
color: var(--color-placeholder);
}
.right-list .cc-result-flow .table-wrap .yisa-table .ant-table-thead th {
background-color: #616b83 !important;
}
.right-list .cc-result-flow .table-wrap .yisa-table .ant-table-tbody td {
background-color: #3e4557 !important;
}
.right-list .cc-result-flow .table-wrap .yisa-table .ant-table-tbody tr:nth-child(even) td {
background-color: #3e4557 !important;
}
.ant-input::placeholder {
color: var(--color-placeholder);
}
.ant-select-selection-placeholder {
color: var(--color-placeholder);
}
.ant-select-disabled.ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
background: var(--color-input-disabled-bg);
color: var(--color-placeholder);
}
.ant-select-disabled .ant-select-arrow {
color: var(--color-placeholder);
}
.ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector {
background-color: var(--color-input-disabled-bg);
color: var(--color-input-disabled-color);
cursor: not-allowed;
}
.ant-select-multiple {
.ant-select-selector {
.ant-select-selection-item {
background-color: var(--color-bg-body);
border-color: var(--color-border);
.ant-select-selection-item-remove {
color: var(--color-text);
}
}
}
}
.ant-select-arrow {
color: var(--color-text);
}
.ant-select-clear {
border-radius: 50%;
}
.ant-select-dropdown-menu {
background-color: var(--color-input-bg);
.ant-select-dropdown-menu-item {
color: var(--color-text);
&.ant-select-dropdown-menu-item-active {
color: #fff;
// background-color: var(--radio-button-bg-checked);
}
&.ant-select-dropdown-menu-item-selected {
color: #fff;
// background-color: var(--radio-button-bg-checked);
}
&:hover {
color: #fff;
// background-color: var(--radio-button-bg-checked);
}
}
}
.ant-select-selector {
background-color: var(--color-search-list-item-bg) !important;
box-shadow: none !important;
border-radius: 4px;
color: var(--color-search-list-item-value);
border-color: var(--color-search-list-item-bd) !important;
}
.ant-select-selection {
background-color: var(--color-input-bg);
box-shadow: none;
color: var(--color-text);
// border-color:var(--checkable-tag-border);
}
.ant-form-horizontal .ant-form-item-label {
label {
display: inline-block;
word-wrap: break-word;
white-space: normal;
}
}
.ant-picker {
width: 100%;
background-color: var(--color-search-list-item-bg);
border-color: var(--color-border);
}
// .yisa-table {
// width: 100%;
// .ant-table-thead {
// th {
// background: var(--color-table-header-bg) !important;
// }
// }
// .ant-table-tbody {
// td {
// background: var(--color-table-body-bg) !important;
// border-bottom-color: var(--color-table-border-bottom-color);
// }
// tr:nth-child(even) {
// td {
// background: var(--color-table-body-bg-nth-child-even) !important;
// }
// }
// tr:nth-child(odd) {
// td {
// background: var(--color-table-body-bg-nth-child-even) !important;
// }
// }
// }
// }
.totalModal{
.ant-modal-footer{
display: none;
}
position: absolute;
top: 40px;
right: 174px;
}
.ltc-item-img {
width: 390px;
height: 300px;
border: 1px solid;
background: #6565656b;
margin-right: 20px !important;
img {
height: 295px;
width: 387px;
// object-fit: contain;
}
}
.hanleHistoyModal{
max-height: 700px;
overflow: auto;
}
.hanleHistoyModal::-webkit-scrollbar {
width: 5px;
}
.hanleHistoyModal::-webkit-scrollbar-thumb {
background-color: #9da2ab;
border-radius: 10px;
}
.modal-img{
img{
width: 200px;
height: 200px;
}
}

154
src/pages/NewEnergy/RecordsInquiry/Charge/loadable.jsx

@ -1,26 +1,13 @@
import React, { useState, useRef, useEffect } from "react";
import {
message,
Pagination,
Table,
Space,
Modal,
Button,
Tabs,
Descriptions,
Input,
Steps,
Select,
Image,
Timeline,
Popover
} from "antd";
import { dictionary } from "@/config/common";
import ajax from "@/services";
import { TableModule } from "@/components";
import "./index.scss";
const { TextArea } = Input;
function Charge() {
//
@ -39,75 +26,57 @@ function Charge() {
const columns = [
{
title: "用户手机号",
dataIndex: "operator",
key: "operator",
align: "center",
},
{
title: "车牌号",
dataIndex: "plate",
key: "plate",
title: "充电订单号",
dataIndex: "order_id",
key: "order_id",
align: "center",
},
{
title: "充电站",
dataIndex: "plate_color",
key: "plate_color",
align: "center",
},
{
title: "商户名称",
dataIndex: "berth_id",
key: "berth_id",
align: "center",
},
{
title: "降预约开始时间",
dataIndex: "in_time",
key: "in_time",
dataIndex: "name",
key: "name",
align: "center",
},
{
title: "预约截至时间",
dataIndex: "in_time",
key: "in_time",
title: "充电电量",
dataIndex: "capacity",
key: "capacity",
align: "center",
},
{
title: "缴纳预约费用金额",
dataIndex: "in_time",
key: "in_time",
title: "电费",
dataIndex: "electric",
key: "electric",
align: "center",
},
{
title: "缴费时间",
dataIndex: "in_time",
key: "in_time",
title: "充电服务费",
dataIndex: "service_fee",
key: "service_fee",
align: "center",
},
{
title: "订单状态",
dataIndex: "in_time",
key: "in_time",
title: "充电收入",
dataIndex: "income",
key: "income",
align: "center",
},
{
title: "订单完结时间",
dataIndex: "in_time",
key: "in_time",
title: "充电开始时间",
dataIndex: "start_time",
key: "start_time",
align: "center",
},
{
title: "预约费用退款金额",
dataIndex: "in_time",
key: "in_time",
title: "充电结束时间",
dataIndex: "end_time",
key: "end_time",
align: "center",
},
{
title: "顶动感实收金额",
dataIndex: "in_time",
key: "in_time",
title: "充电时长",
dataIndex: "duration",
key: "duration",
align: "center",
},
{
@ -117,54 +86,36 @@ function Charge() {
align: "center",
fixed: "right",
width: 100,
render: (text, record, index) => {
return (
<>
<Button type="primary" onClick={() => openModal(index, record)}>
</Button>
</>
)
// render: (text, record, index) => {
// return (
// <>
// <Button type="primary" onClick={() => openModal(index, record)}>
//
// </Button>
// </>
// )
},
// },
},
];
const formSearch = [
{
name: "phone",
name: "name",
type: "Input",
label: "用户手机号",
placeholder: "请输入用户手机号",
label: "充电站名称",
placeholder: "请输入充电站名称",
},
{
name: "plate",
name: "order_id",
type: "Input",
label: "车牌号",
placeholder: "请输入车牌号",
},
{
name: "charging",
type: "Input",
label: "充电站",
placeholder: "请输入充电站",
},
{
name: "operator",
type: "Select",
label: "商户名称",
defaultValue: "0",
placeholder: "请选择商户名称",
},
{
name: "timeStart",
type: "DateRangePicker",
label: "预约开始时间",
label: "订单编号",
placeholder: "请输入订单编号",
},
{
name: "timeEnd",
name: "start_time",
type: "DateRangePicker",
label: "订单完结时间",
label: "充电开始时间",
},
];
@ -176,10 +127,10 @@ function Charge() {
//
const search = (params) => {
ajax.getParkingList(params).then((res) => {
ajax.recordsInquiry.getChargeList(params).then((res) => {
if (res.status === 20000) {
setTableData(res.data.list);
setTotal(res.data.total);
setTableData(res.data);
setTotal(res.total);
} else {
message.error(res.message)
}
@ -194,20 +145,11 @@ function Charge() {
<>
<TableModule
showSerial={true}
isExport={false}
diyButton={
<Button
type="primary"
onClick={handelAdd}
>
新增
</Button>
}
columns={columns}
tableData={tableData}
formSearch={formSearch}
pagename="预约订单"
pageName={'Appointment'}
pagename="充电订单"
pageName={'charge'}
initFormData={initFormData}
total={total}
search={search}

4
src/pages/NewEnergy/RecordsInquiry/Unlocking/index.jsx

@ -2,5 +2,5 @@ import React from "react"
import loadable from "@loadable/component"
import { LoadingImg } from "@/components"
const UnlockingRecord = loadable(() => import("./loadable"))
export default (pros) => <UnlockingRecord {...pros} fallback={<LoadingImg />} />
const Unlocking = loadable(() => import("./loadable"))
export default (pros) => <Unlocking {...pros} fallback={<LoadingImg />} />

238
src/pages/NewEnergy/RecordsInquiry/Unlocking/index.scss

@ -1,238 +0,0 @@
@import "@/assets/css/mixin.scss";
$color-container-bg: var(--color-container-bg);
$color-user-list-bg: var(--color-user-list-bg);
$color-text: var(--color-text);
$color-primary: var(--color-primary);
.ant-tabs {
margin-bottom: 16px;
.ant-tabs-nav {
margin-bottom: 0 !important;
&::before {
border-bottom: 1px solid var(--color-card-line) !important;
}
}
.ant-tabs-nav-wrap {
width: 100%;
box-sizing: content-box;
.ant-tabs-nav-list {
width: 340px;
.ant-tabs-ink-bar {
height: 3px;
background-color: #00ccff;
}
.ant-tabs-tab {
flex: 1;
width: 100%;
display: flex;
justify-content: center;
padding-bottom: 10px;
text-align: center;
cursor: pointer;
font-size: 14px !important;
font-family: MicrosoftYaHei;
text-align: center;
letter-spacing: 0.7px;
}
.ant-tabs-tab-active {
div {
color: #00ccff;
}
}
}
}
}
.ant-input::-webkit-input-placeholder {
color: var(--color-placeholder);
}
.ant-input::-moz-placeholder {
color: var(--color-placeholder);
}
.right-list .ant-btn-primary {
width: 68px;
height: 30px;
background: linear-gradient(180deg, #3aa9ff, #59b7ff);
border-radius: 4px;
}
.ant-input:-ms-input-placeholder {
color: var(--color-placeholder);
}
.right-list .cc-result-flow .table-wrap .yisa-table .ant-table-thead th {
background-color: #616b83 !important;
}
.right-list .cc-result-flow .table-wrap .yisa-table .ant-table-tbody td {
background-color: #3e4557 !important;
}
.right-list .cc-result-flow .table-wrap .yisa-table .ant-table-tbody tr:nth-child(even) td {
background-color: #3e4557 !important;
}
.ant-input::placeholder {
color: var(--color-placeholder);
}
.ant-select-selection-placeholder {
color: var(--color-placeholder);
}
.ant-select-disabled.ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
background: var(--color-input-disabled-bg);
color: var(--color-placeholder);
}
.ant-select-disabled .ant-select-arrow {
color: var(--color-placeholder);
}
.ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector {
background-color: var(--color-input-disabled-bg);
color: var(--color-input-disabled-color);
cursor: not-allowed;
}
.ant-select-multiple {
.ant-select-selector {
.ant-select-selection-item {
background-color: var(--color-bg-body);
border-color: var(--color-border);
.ant-select-selection-item-remove {
color: var(--color-text);
}
}
}
}
.ant-select-arrow {
color: var(--color-text);
}
.ant-select-clear {
border-radius: 50%;
}
.ant-select-dropdown-menu {
background-color: var(--color-input-bg);
.ant-select-dropdown-menu-item {
color: var(--color-text);
&.ant-select-dropdown-menu-item-active {
color: #fff;
// background-color: var(--radio-button-bg-checked);
}
&.ant-select-dropdown-menu-item-selected {
color: #fff;
// background-color: var(--radio-button-bg-checked);
}
&:hover {
color: #fff;
// background-color: var(--radio-button-bg-checked);
}
}
}
.ant-select-selector {
background-color: var(--color-search-list-item-bg) !important;
box-shadow: none !important;
border-radius: 4px;
color: var(--color-search-list-item-value);
border-color: var(--color-search-list-item-bd) !important;
}
.ant-select-selection {
background-color: var(--color-input-bg);
box-shadow: none;
color: var(--color-text);
// border-color:var(--checkable-tag-border);
}
.ant-form-horizontal .ant-form-item-label {
label {
display: inline-block;
word-wrap: break-word;
white-space: normal;
}
}
.ant-picker {
width: 100%;
background-color: var(--color-search-list-item-bg);
border-color: var(--color-border);
}
// .yisa-table {
// width: 100%;
// .ant-table-thead {
// th {
// background: var(--color-table-header-bg) !important;
// }
// }
// .ant-table-tbody {
// td {
// background: var(--color-table-body-bg) !important;
// border-bottom-color: var(--color-table-border-bottom-color);
// }
// tr:nth-child(even) {
// td {
// background: var(--color-table-body-bg-nth-child-even) !important;
// }
// }
// tr:nth-child(odd) {
// td {
// background: var(--color-table-body-bg-nth-child-even) !important;
// }
// }
// }
// }
.totalModal{
.ant-modal-footer{
display: none;
}
position: absolute;
top: 40px;
right: 174px;
}
.ltc-item-img {
width: 390px;
height: 300px;
border: 1px solid;
background: #6565656b;
margin-right: 20px !important;
img {
height: 295px;
width: 387px;
// object-fit: contain;
}
}
.hanleHistoyModal{
max-height: 700px;
overflow: auto;
}
.hanleHistoyModal::-webkit-scrollbar {
width: 5px;
}
.hanleHistoyModal::-webkit-scrollbar-thumb {
background-color: #9da2ab;
border-radius: 10px;
}
.modal-img{
img{
width: 200px;
height: 200px;
}
}

97
src/pages/NewEnergy/RecordsInquiry/Unlocking/loadable.jsx

@ -21,10 +21,10 @@ import { TableModule } from "@/components";
import "./index.scss";
const { TextArea } = Input;
function UnlockingRecord() {
//
function Unlocking() {
//
const [detailVisible, setDetailVisible] = useState(false);
// const [detailVisible, setDetailVisible] = useState(false);
//
const [tableData, setTableData] = useState([]);
//
@ -33,91 +33,86 @@ function UnlockingRecord() {
const [detailData, setDetailData] = useState({});
//
const initFormData = {
operator: "0",
tel_number: "",
rule_name: "",
};
const formSearch = [
{
name: "tel_number",
name: "tel",
type: "Input",
label: "手机号",
placeholder: "请输入手机号",
label: "用户手机号",
placeholder: "请输入",
},
{
name: "tel_number",
name: "charging_station",
type: "Input",
label: "充电站",
placeholder: "请输入充电站",
placeholder: "请输入",
},
{
name: "tel_number",
name: "ground_lock_name",
type: "Input",
label: "地锁名称",
placeholder: "请输入地锁名称",
placeholder: "请输入",
},
{
name: "timePeriod",
type: "RangePicker",
label: "锁时间范围",
label: "锁时间范围",
},
]; //
]; //
const columns = [
{
title: "运营商名称",
dataIndex: "operator",
key: "operator",
title: "用户手机号",
dataIndex: "tel",
key: "tel",
align: "center",
},
{
title: "规则名称",
title: "车牌号",
dataIndex: "plate",
key: "plate",
align: "center",
},
{
title: "规则编码",
dataIndex: "plate_color",
key: "plate_color",
title: "地锁名称",
dataIndex: "ground_lock_name",
key: "ground_lock_name",
align: "center",
},
{
title: "创建人",
dataIndex: "berth_id",
key: "berth_id",
width: 100,
title: "所在充电站",
dataIndex: "local_charging_station",
key: "local_charging_station",
// width: 100,
align: "center",
},
{
title: "创建时间",
dataIndex: "in_time",
key: "in_time",
title: "降锁时间",
dataIndex: "lockdown_time",
key: "lockdown_time",
align: "center",
},
{
title: "操作",
dataIndex: "operation",
key: "operation",
title: "升锁时间",
dataIndex: "unlocking_time",
key: "unlocking_time",
align: "center",
fixed: "right",
width: 100,
render: (text, record, index) => {
return (
<>
<Button type="primary" onClick={() => openModal(index, record)}>
详情
</Button>
</>
)
},
// fixed: "right",
// width: 100,
},
{
title: "开锁方式",
dataIndex: "unlocking_method",
key: "unlocking_method",
align: "center",
// fixed: "right",
// width: 100,
},
]; //
//
const openModal = (index, record) => {
setDetailData(record)
@ -126,7 +121,7 @@ function UnlockingRecord() {
//
const search = (params) => {
ajax.getParkingList(params).then((res) => {
ajax.recordsInquiry.getUnlockingList(params).then((res) => {
if (res.status === 20000) {
setTableData(res.data.list);
setTotal(res.data.total);
@ -156,14 +151,14 @@ function UnlockingRecord() {
columns={columns}
tableData={tableData}
formSearch={formSearch}
pagename="停车记录查询"
pageName={'AppointmentRecord'}
pagename="开锁记录"
pageName={'unlockingRecord'}
initFormData={initFormData}
total={total}
search={search}
exportUrl="/api/bpm/record/get_record_export"
/>
<Modal
{/* <Modal
open={detailVisible}
width={1500}
className="totalModal"
@ -173,9 +168,9 @@ function UnlockingRecord() {
destroyOnClose
>
</Modal>
</Modal> */}
</>
);
}
export default UnlockingRecord;
export default Unlocking;

238
src/pages/NewEnergy/RecordsInquiry/Violation/index.scss

@ -1,238 +0,0 @@
@import "@/assets/css/mixin.scss";
$color-container-bg: var(--color-container-bg);
$color-user-list-bg: var(--color-user-list-bg);
$color-text: var(--color-text);
$color-primary: var(--color-primary);
.ant-tabs {
margin-bottom: 16px;
.ant-tabs-nav {
margin-bottom: 0 !important;
&::before {
border-bottom: 1px solid var(--color-card-line) !important;
}
}
.ant-tabs-nav-wrap {
width: 100%;
box-sizing: content-box;
.ant-tabs-nav-list {
width: 340px;
.ant-tabs-ink-bar {
height: 3px;
background-color: #00ccff;
}
.ant-tabs-tab {
flex: 1;
width: 100%;
display: flex;
justify-content: center;
padding-bottom: 10px;
text-align: center;
cursor: pointer;
font-size: 14px !important;
font-family: MicrosoftYaHei;
text-align: center;
letter-spacing: 0.7px;
}
.ant-tabs-tab-active {
div {
color: #00ccff;
}
}
}
}
}
.ant-input::-webkit-input-placeholder {
color: var(--color-placeholder);
}
.ant-input::-moz-placeholder {
color: var(--color-placeholder);
}
.right-list .ant-btn-primary {
width: 68px;
height: 30px;
background: linear-gradient(180deg, #3aa9ff, #59b7ff);
border-radius: 4px;
}
.ant-input:-ms-input-placeholder {
color: var(--color-placeholder);
}
.right-list .cc-result-flow .table-wrap .yisa-table .ant-table-thead th {
background-color: #616b83 !important;
}
.right-list .cc-result-flow .table-wrap .yisa-table .ant-table-tbody td {
background-color: #3e4557 !important;
}
.right-list .cc-result-flow .table-wrap .yisa-table .ant-table-tbody tr:nth-child(even) td {
background-color: #3e4557 !important;
}
.ant-input::placeholder {
color: var(--color-placeholder);
}
.ant-select-selection-placeholder {
color: var(--color-placeholder);
}
.ant-select-disabled.ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
background: var(--color-input-disabled-bg);
color: var(--color-placeholder);
}
.ant-select-disabled .ant-select-arrow {
color: var(--color-placeholder);
}
.ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector {
background-color: var(--color-input-disabled-bg);
color: var(--color-input-disabled-color);
cursor: not-allowed;
}
.ant-select-multiple {
.ant-select-selector {
.ant-select-selection-item {
background-color: var(--color-bg-body);
border-color: var(--color-border);
.ant-select-selection-item-remove {
color: var(--color-text);
}
}
}
}
.ant-select-arrow {
color: var(--color-text);
}
.ant-select-clear {
border-radius: 50%;
}
.ant-select-dropdown-menu {
background-color: var(--color-input-bg);
.ant-select-dropdown-menu-item {
color: var(--color-text);
&.ant-select-dropdown-menu-item-active {
color: #fff;
// background-color: var(--radio-button-bg-checked);
}
&.ant-select-dropdown-menu-item-selected {
color: #fff;
// background-color: var(--radio-button-bg-checked);
}
&:hover {
color: #fff;
// background-color: var(--radio-button-bg-checked);
}
}
}
.ant-select-selector {
background-color: var(--color-search-list-item-bg) !important;
box-shadow: none !important;
border-radius: 4px;
color: var(--color-search-list-item-value);
border-color: var(--color-search-list-item-bd) !important;
}
.ant-select-selection {
background-color: var(--color-input-bg);
box-shadow: none;
color: var(--color-text);
// border-color:var(--checkable-tag-border);
}
.ant-form-horizontal .ant-form-item-label {
label {
display: inline-block;
word-wrap: break-word;
white-space: normal;
}
}
.ant-picker {
width: 100%;
background-color: var(--color-search-list-item-bg);
border-color: var(--color-border);
}
// .yisa-table {
// width: 100%;
// .ant-table-thead {
// th {
// background: var(--color-table-header-bg) !important;
// }
// }
// .ant-table-tbody {
// td {
// background: var(--color-table-body-bg) !important;
// border-bottom-color: var(--color-table-border-bottom-color);
// }
// tr:nth-child(even) {
// td {
// background: var(--color-table-body-bg-nth-child-even) !important;
// }
// }
// tr:nth-child(odd) {
// td {
// background: var(--color-table-body-bg-nth-child-even) !important;
// }
// }
// }
// }
.totalModal{
.ant-modal-footer{
display: none;
}
position: absolute;
top: 40px;
right: 174px;
}
.ltc-item-img {
width: 390px;
height: 300px;
border: 1px solid;
background: #6565656b;
margin-right: 20px !important;
img {
height: 295px;
width: 387px;
// object-fit: contain;
}
}
.hanleHistoyModal{
max-height: 700px;
overflow: auto;
}
.hanleHistoyModal::-webkit-scrollbar {
width: 5px;
}
.hanleHistoyModal::-webkit-scrollbar-thumb {
background-color: #9da2ab;
border-radius: 10px;
}
.modal-img{
img{
width: 200px;
height: 200px;
}
}

159
src/pages/NewEnergy/RecordsInquiry/Violation/loadable.jsx

@ -1,32 +1,21 @@
import React, { useState, useRef, useEffect } from "react";
import {
message,
Pagination,
Table,
Space,
Modal,
Button,
Tabs,
Descriptions,
Input,
Steps,
Select,
Image,
Timeline,
Popover
} from "antd";
import { dictionary } from "@/config/common";
import ajax from "@/services";
import { TableModule } from "@/components";
import "./index.scss";
const { TextArea } = Input;
function Violation() {
//
const [detailVisible, setDetailVisible] = useState(false);
//
const [tableData, setTableData] = useState([]);
//
const [typeList, setTypeList] = useState([]);
//
const [total, setTotal] = useState(0);
//
@ -40,8 +29,8 @@ function Violation() {
const columns = [
{
title: "用户手机号",
dataIndex: "operator",
key: "operator",
dataIndex: "phone",
key: "phone",
align: "center",
},
{
@ -52,62 +41,20 @@ function Violation() {
},
{
title: "充电站",
dataIndex: "plate_color",
key: "plate_color",
dataIndex: "name",
key: "name",
align: "center",
},
{
title: "商户名称",
dataIndex: "berth_id",
key: "berth_id",
title: "违规类型",
dataIndex: "type",
key: "type",
align: "center",
},
{
title: "降预约开始时间",
dataIndex: "in_time",
key: "in_time",
align: "center",
},
{
title: "预约截至时间",
dataIndex: "in_time",
key: "in_time",
align: "center",
},
{
title: "缴纳预约费用金额",
dataIndex: "in_time",
key: "in_time",
align: "center",
},
{
title: "缴费时间",
dataIndex: "in_time",
key: "in_time",
align: "center",
},
{
title: "订单状态",
dataIndex: "in_time",
key: "in_time",
align: "center",
},
{
title: "订单完结时间",
dataIndex: "in_time",
key: "in_time",
align: "center",
},
{
title: "预约费用退款金额",
dataIndex: "in_time",
key: "in_time",
align: "center",
},
{
title: "顶动感实收金额",
dataIndex: "in_time",
key: "in_time",
title: "记录创建时间",
dataIndex: "create_time",
key: "create_time",
align: "center",
},
{
@ -117,16 +64,16 @@ function Violation() {
align: "center",
fixed: "right",
width: 100,
render: (text, record, index) => {
return (
<>
<Button type="primary" onClick={() => openModal(index, record)}>
</Button>
</>
)
// render: (text, record, index) => {
// return (
// <>
// <Button type="primary" onClick={() => openModal(index, record)}>
//
// </Button>
// </>
// )
},
// },
},
];
@ -144,30 +91,40 @@ function Violation() {
placeholder: "请输入车牌号",
},
{
name: "charging",
name: "name",
type: "Input",
label: "充电站",
placeholder: "请输入充电站",
},
{
name: "operator",
name: "type",
type: "Select",
label: "商户名称",
label: "违规类型",
options: typeList,
defaultValue: "0",
placeholder: "请选择商户名称",
placeholder: "请选择违规类型",
},
{
name: "timeStart",
name: "create_time",
type: "DateRangePicker",
label: "预约开始时间",
},
{
name: "timeEnd",
type: "DateRangePicker",
label: "订单完结时间",
label: "记录创建时间",
},
];
//
const getSelect = () => {
ajax.recordsInquiry.getViolationSelect().then((res) => {
const { status, data } = res
if (status === 20000) {
if (data && data.length) {
setTypeList(data);
}
} else {
message.error(res.message)
}
});
}
//
const openModal = (index, record) => {
setDetailData(record)
@ -176,10 +133,10 @@ function Violation() {
//
const search = (params) => {
ajax.getParkingList(params).then((res) => {
ajax.recordsInquiry.getViolationList(params).then((res) => {
if (res.status === 20000) {
setTableData(res.data.list);
setTotal(res.data.total);
setTableData(res.data);
setTotal(res.total);
} else {
message.error(res.message)
}
@ -190,24 +147,30 @@ function Violation() {
setDetailVisible(true)
}
useEffect(() => {
getSelect()
}, [])
return (
<>
<TableModule
showSerial={true}
isExport={false}
diyButton={
<Button
type="primary"
onClick={handelAdd}
>
</Button>
}
// diyButton={
// <Button
// type="primary"
// onClick={handelAdd}
// >
//
// </Button>
// }
columns={columns}
tableData={tableData}
formSearch={formSearch}
pagename="预约订单"
pageName={'Appointment'}
pagename="违规订单"
pageName={'violation'}
initFormData={initFormData}
total={total}
search={search}

2
src/pages/NewEnergy/index.jsx

@ -1,10 +1,12 @@
import ChargingMgm from './ChargingMgm'
import NewEnergyOverview from './NewEnergyOverview'
import ChargeStationMgm from './ChargeStationMgm'
import RecordsInquiry from './RecordsInquiry'
import RealtimeMonitor from './RealtimeMonitor'
export default {
NewEnergyOverview,
ChargeStationMgm,
...RealtimeMonitor,
...ChargingMgm,
...RecordsInquiry,

8
src/pages/OffPeak/OffPeakTimeMgm/ManagementTime/loadable.jsx

@ -70,7 +70,7 @@ function ManagementTime(props) {
title: `提示`,
content: `是否确认删除选中的数据项?`,
onOk: () => {
ajax.getDelRuleLink({ids:[record.id]}).then((res) => {
ajax.getDelRuleLink({ids:[record.id],rule_id:id}).then((res) => {
if (res.status === 20000) {
message.success('删除成功')
tableRef.current.fetch(1,{})
@ -167,7 +167,7 @@ function ManagementTime(props) {
title: `提示`,
content: `是否确认删除选中的数据项?`,
onOk: () => {
ajax.getDelRuleLink({ids:tableSelectCheck}).then((res) => {
ajax.getDelRuleLink({ids:tableSelectCheck,rule_id:id}).then((res) => {
if (res.status === 20000) {
message.success('删除成功')
tableRef.current.fetch(1,{})
@ -191,7 +191,9 @@ function ManagementTime(props) {
message.warning(`时间规则不可为空`);
return
}
ajax.getRuleLinkAdd(rowData).then((res) => {
let data = rowData
data.rule_id=id
ajax.getRuleLinkAdd(data).then((res) => {
if (res.status === 20000) {
setVisible(false);
message.success("新增成功")

8
src/pages/OffPeak/OffPeakTimeMgm/RuleDetail/loadable.jsx

@ -118,10 +118,11 @@ function RuleDetail() {
setActionState("edit");
setVisible(true);
setEditId(record.id)
let dataType=selectData.filter(item => { return item.label==record.date_type})
setRowData({
...rowData,
name: record.name,
date_type:record.date_type,
date_type:dataType[0].value||"",
start_time: record.start_time,
end_time: record.end_time,
is_in: record.is_in,
@ -365,7 +366,8 @@ function RuleDetail() {
<FormSelect
yisaLabel="是否可以进入"
yisaData={modalSelectData}
defaultValue={rowData.is_in || null}
defaultValue={rowData.is_in===""?null:rowData.is_in}
// defaultValue={rowData.is_in}
placeholder="请选择是否可以进入"
hasUnlimited={false}
required={true}
@ -375,7 +377,7 @@ function RuleDetail() {
<FormSelect
yisaLabel="是否可以出场"
yisaData={modalSelectData}
defaultValue={rowData.is_out || null}
defaultValue={rowData.is_out===""? null:rowData.is_out}
placeholder="请选择是否可以出场"
hasUnlimited={false}
required={true}

82
src/pages/OutRoadMgm/OutRoadOverview/loadable.jsx

@ -4,13 +4,19 @@ import shouruzonge from "@/assets/images/shouruzonge.png";
import ReactEcharts from "echarts-for-react";
import { useSelector } from "react-redux";
import "./index.scss";
import { VideoPlay } from "@/components";
import { Select, Tooltip } from "antd";
const OutRoadOverview = () => {
const skin = useSelector((state) => {
return state.common.skin;
});
const textColor = skin == "dark" ? "#fff" : "#000";
const [refData, setRefData] = useState("https://sample-videos.com/video123/flv/720/big_buck_bunny_720p_1mb.flv")
const [videoType, setVideoType] = useState('flv')
const [videoRoad, setVideoRoad] = useState([])
const [roadId, setRoadId] = useState()
const [videoDevice, setVideoDevice] = useState([])
const [videoPlay, setVideoPlay] = useState('')
const [headerNums, setHeaderNums] = useState({
park_num: 0,
bowei_num: 0,
@ -270,7 +276,46 @@ const OutRoadOverview = () => {
console.error(err);
});
}
//-
function getOutRoadVideoRoad() {
ajax
.getOutRoadVideoRoad()
.then((res) => {
if (res.status === 20000) {
setVideoRoad(res.data);
}
})
.catch((err) => {
console.error(err);
});
}
//-
function getOutRoadVideoDevice() {
ajax
.getOutRoadVideoDevice()
.then((res) => {
if (res.status === 20000) {
setVideoDevice(res.data);
}
})
.catch((err) => {
console.error(err);
});
}
//
function getOutRoadVideoPlay() {
ajax
.getOutRoadVideoPlay()
.then((res) => {
if (res.status === 20000) {
setVideoPlay(res.data.url);
handleFlvPlay(res.data.url)
}
})
.catch((err) => {
console.error(err);
});
}
// -top5
function getIncomeTop5() {
ajax
@ -339,7 +384,14 @@ const OutRoadOverview = () => {
})
}
const videoRef = useRef()
const handleFlvPlay = (e) => {
videoRef.current.closeVideo()
setVideoType("mp4")
//if(videoPlay){
videoRef.current.changeUrl(e)
//}
}
useEffect(() => {
getBaseNumber();
getIncomeTop5();
@ -347,8 +399,13 @@ const OutRoadOverview = () => {
getParkingIncome();
getParkingRecord();
getPageConfig();
getOutRoadVideoRoad();
}, []);
useEffect(() => {
if(roadId){
getOutRoadVideoDevice(roadId)
}
}, [roadId]);
return (
<div className="OutRoadOverview">
<div id="header">
@ -473,13 +530,18 @@ const OutRoadOverview = () => {
<div>
<Select
placeholder="请选择停车场"
options={[
{
label: "青岛停车场",
value: 0,
},
]}
value={roadId}
options={videoRoad}
onChange={(e)=>setRoadId(e)}
/>
<Select
placeholder="请选择监控设备"
options={videoDevice}
onChange={(e) => { getOutRoadVideoPlay({ id: e, type: 1 }) }}
/>
<div>
<VideoPlay ref={videoRef} videoType={videoType} />
</div>
</div>
</div>
<div className="right">

6
src/router/router.config.js

@ -1343,6 +1343,12 @@ let routes = [
component: pages.OrderRuleMgm,
},
{
path: "/newEnergy/chargeStationMgm",
text: "充电站管理",
name: "chargeStationMgm",
component: pages.ChargeStationMgm,
},
{
path: "/newEnergy/charge",
text: "充电订单",
name: "charge",

32
src/services/NewEnergy/ChargeStationMgm.js

@ -0,0 +1,32 @@
import ajax from "@/config/ajax"
// 充电站管理
// 获取列表数据
const getStationList = (params) => {
return ajax({
url: "/api/fin/charge_station/get_list",
type: "post",
data: params,
});
};
// 获取站点状态
const getSiteStatus = (params) => {
return ajax({
url: "/api/fin/charge_station/site_status",
type: "get",
data: params,
});
};
// 新增充电站
const addStation = (params) => {
return ajax({
url: "/api/fin/charge_station/add_station",
type: "post",
data: params,
});
};
export default{
getSiteStatus,
getStationList,
addStation
}

41
src/services/NewEnergy/chargingMgm.js

@ -9,6 +9,45 @@ const getWechatMenuList = (params) => {
});
};
// 获取运营商下拉
const getOperatorList = (params) => {
return ajax({
url: "/api/nes/rule/operator",
type: "get",
data: params,
});
};
// 获取规则列表
const getRegularList = (params) => {
return ajax({
url: "/api/nes/rule/list",
type: "post",
data: params,
});
};
// 新增规则
const addRule = (params) => {
return ajax({
url: "/api/nes/rule/add",
type: "post",
data: params,
});
};
// 更新规则状态
const updataRule = (params) => {
return ajax({
url: "/api/nes/rule/update",
type: "post",
data: params,
});
};
export default{
getWechatMenuList
getWechatMenuList,
getOperatorList,
getRegularList,
addRule,
updataRule
}

7
src/services/NewEnergy/index.js

@ -1,7 +1,12 @@
import chargingMgm from './chargingMgm'
import chargeStationMgm from './ChargeStationMgm'
import realtimeMonitor from './realtimeMonitor'
import recordsInquiry from './recordsInquiry'
export default {
...chargingMgm,
...realtimeMonitor
...realtimeMonitor,
...chargeStationMgm,
recordsInquiry,
}

55
src/services/NewEnergy/recordsInquiry.js

@ -0,0 +1,55 @@
import ajax from "@/config/ajax"
// 开锁记录查询
const getUnlockingList = (params) => {
return ajax({
url: "/api/new_power/records/unlocking",
type: "post",
data: params,
});
};
// 预约记录查询
const getAppointmentList = (params) => {
return ajax({
url: "/api/new_power/records/appointment_list",
type: "post",
data: params,
});
};
// 充电记录查询
const getChargeList = (params) => {
return ajax({
url: "/api/new_power/records/charge_list",
type: "post",
data: params,
});
};
// 违规记录查询
const getViolationList = (params) => {
return ajax({
url: "/api/new_power/records/violation_list",
type: "post",
data: params,
});
};
// 违规类型下拉
const getViolationSelect = (params) => {
return ajax({
url: "/api/new_power/records/violation_select",
type: "get",
data: params,
});
};
export default {
getUnlockingList,
getAppointmentList,
getChargeList,
getViolationList,
getViolationSelect
}

27
src/services/OutRoadMgm/OutRoadOverview.js

@ -41,10 +41,37 @@ const getOutRoadParkingRecordsInfo = (params) => {
data: params,
});
};
///概览-存在监控设备的停车场下拉框
const getOutRoadVideoRoad = (params) => {
return ajax({
url: "/api/orp/nvr/video_road",
type: "get",
data: params,
});
};
///概览-查指定车场存在的监控设备
const getOutRoadVideoDevice = (params) => {
return ajax({
url: "/api/orp/nvr/road_device",
type: "get",
data: params,
});
};
///查看监控视频
const getOutRoadVideoPlay = (params) => {
return ajax({
url: "/api/orp/nvr/get_video_play",
type: "post",
data: params,
});
};
export default {
getOutRoadBaseInfo,
getOutRoadParkingTopInfo,
getOutRoadPaymentTopInfo,
getOutRoadParkingIncomeInfo,
getOutRoadParkingRecordsInfo,
getOutRoadVideoRoad,
getOutRoadVideoDevice,
getOutRoadVideoPlay,
};
Loading…
Cancel
Save