Browse Source

fix():调整样式

tags/PMS_Frontend_v1.0.6-develop
guoxin 1 year ago
parent
commit
bdddfc8707
  1. 19
      src/assets/css/base.scss
  2. 4
      src/assets/css/mixin.scss
  3. 50
      src/pages/InRoadMgm/BusinessMgm/ChargeRules/index.scss
  4. 177
      src/pages/InRoadMgm/BusinessMgm/ChargeRules/loadable.jsx
  5. 4
      src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/index.scss
  6. 17
      src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx
  7. 11
      src/services/OperationCenter/CustomerServieMgm/index.js
  8. 12
      src/services/search.js

19
src/assets/css/base.scss

@ -53,6 +53,25 @@ a {
.right-list .cc-result-flow .table-wrap .yisa-table .ant-table-tbody tr:nth-child(even) td {
background-color: #3e4557 !important;
}
.ant-table.ant-table-bordered > .ant-table-container > .ant-table-content {
max-height: 715px;
overflow: auto;
}
.ant-table-content::-webkit-scrollbar {
width: 5px;
}
.ant-table-content::-webkit-scrollbar-thumb {
background-color: #9da2ab;
border-radius: 10px;
}
.ant-table-thead{
position: sticky;
top: 0;
z-index: 1;
}
.ant-table.ant-table-bordered>.ant-table-container{
border-left: none !important;
}
.colorBtn {
width: 90px;
height: 36px;

4
src/assets/css/mixin.scss

@ -11,14 +11,14 @@
&::-webkit-scrollbar-track-piece,
&::-webkit-scrollbar-corner,
&::-webkit-scrollbar-track {
background: #3B97FF;
background: #9da2ab;
}
&::-webkit-scrollbar {
width: 4px;
height: 4px;
}
&::-webkit-scrollbar-thumb {
background: #{$item};
background: #9da2ab;
border-radius: 2px;
}
}

50
src/pages/InRoadMgm/BusinessMgm/ChargeRules/index.scss

@ -104,6 +104,7 @@ $color-primary : var(--color-primary);
border-top: none !important;
border-left: none !important;
}
.ant-table-tbody .ant-table-row .ant-table-cell{
background-color: #3e4557 !important;
color: #ffffff !important;
@ -399,4 +400,53 @@ $color-primary : var(--color-primary);
margin-left: 20px;
}
}
}
.bindModal{
width: 1000px !important;
.selectChange{
text-align: center;
}
.patkPay{
display: flex;
margin-top: 20px;
margin: 20px 0 0 20px;
.bind{
margin-left: 20px;
.colorBtn{
height: 36px;
}
}
}
.bindTable{
margin-top: 30px;
}
.ant-table-thead .ant-table-cell{
background-color: #616b83 !important;
color: #ffffff !important;
font-size: 14px;
font-family: Microsoft YaHei, Microsoft YaHei-Bold;
font-weight: 700;
text-align: center;
border-right: none !important;
border-top-color: #888f9d !important;
border-color: #888f9d !important;
}
.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table, .ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table{
border-top: none !important;
border-left: none !important;
}
.ant-table-tbody>tr.ant-table-placeholder:hover>td{
background: none !important;
}
.ant-table-tbody .ant-table-row .ant-table-cell{
background-color: #3e4557 !important;
color: #ffffff !important;
text-align: center;
font-size: 14px;
font-family: Microsoft YaHei, Microsoft YaHei-Regular;
font-weight: 400;
border-right: none !important;
border-left: none !important;
border-bottom-color: #626b7e !important;
}
}

177
src/pages/InRoadMgm/BusinessMgm/ChargeRules/loadable.jsx

@ -38,6 +38,7 @@ function ChargeRules(props) {
const [countAddIntervalNum, setCountAddIntervalNum] = useState([0])
const [effectNum, setEffectNum] = useState([0])
const [countNum, setCountNum] = useState([0])
const [bindVisible, setBindVisible] = useState(false)
const addTime = () => {
setCount([...count, count.length + 1])
}
@ -228,6 +229,34 @@ function ChargeRules(props) {
}
return result;
}
//
const columns = () => {
let result = [...handleBindColumns]
return result;
}
let handleBindColumns = [
{
title: '车场名称',
dataIndex: 'road_name',
key: 'road_name',
},
{
title: '计费类型',
dataIndex: 'charge_type_name',
key: 'charge_type_name',
},
{
title: '计费规则',
dataIndex: 'rule_name',
key: 'rule_name',
},
{
title: '区域',
dataIndex: 'area_name',
key: 'area_name',
},
]
const onChangeMin = (e) => {
if (e.target.checked == true) {
setGetAddData({ ...getAddData, freeTimeAble: 0 })
@ -291,6 +320,7 @@ function ChargeRules(props) {
<div className="black">
<div onClick={() => { deleteApplyBtn(record) }}>编辑</div>
<div onClick={() => { applyBtn(record) }}>删除</div>
<div onClick={() => { bindPark(record) }}>绑定车场</div>
</div>}>
<button className="blackRecordBtn colorBtn">操作</button>
</Popover>
@ -309,6 +339,12 @@ function ChargeRules(props) {
setGetDeleteData(record)
setDeleteVisible(true)
}
//
const [getBindId, setGetBindId] = useState({})
const bindPark = (record) => {
setBindVisible(true)
setGetBindId(record)
}
const deleteModal = () => {
setDeleteVisible(false)
}
@ -337,7 +373,7 @@ function ChargeRules(props) {
setResultData({
...resultData,
data: resDataArr,
total_records: res.data.total_records
total_records: res.data.total
})
} else {
setResultData({
@ -380,6 +416,75 @@ function ChargeRules(props) {
const editModal = () => {
setGetEditVisible(false)
}
//
const [bindCarPark, setBindCarPark] = useState({})
const [bindData, setBindData] = useState({})
const bindModal = () => {
setBindVisible(false)
}
//
const handleCarType = (v) => {
setBindCarPark(v)
setBindData({
...bindData,
vehicle_type: v
})
}
//
const handleParkPay = (v) => {
setBindData({
...bindData,
charge_type: v
})
}
//
const handleName = (v) => {
setBindData({
...bindData,
road_parent_id: v.target.value
})
}
//
const [getColumnList, setGetColumnList] = useState([])
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
const [getStatus, setGetStatus] = useState(false)
const getBindData = () => {
let data = {
...bindData,
id: getBindId.id
}
ajax.getRoadList(data).then(res => {
if (res.status === 20000) {
let resDataArr = res.data.list.map((item) => {
item.key = item.id
return item
})
setGetColumnList({
...getColumnList,
data: resDataArr,
total_records: res.data.total
})
setGetStatus(true)
} else {
message.error(res.message)
}
})
}
const onSelectChange = (newSelectedRowKeys) => {
setSelectedRowKeys(newSelectedRowKeys);
};
const rowSelection = {
selectedRowKeys,
onChange: onSelectChange,
};
const hasSelected = selectedRowKeys.length > 0;
const start = () => {
setLoading(true);
// ajax request after empty completing
setTimeout(() => {
setSelectedRowKeys([]);
}, 1000);
};
const [getOperationName, setGetOperationName] = useState([])
const operationName = () => {
ajax.getOperator().then(res => {
@ -438,7 +543,7 @@ function ChargeRules(props) {
</div>
<div className="paid-result">
<div className="result">
<span className="font">共检索到<em>{resultData.total_records}</em>条结果</span>
<span className="font">共检索到<em>{resultData.total}</em>条结果</span>
<ResultFlowResult ajaxLoad={ajaxLoading} resultData={resultData.data ? resultData.data : []}>
<Table
bordered
@ -468,7 +573,7 @@ function ChargeRules(props) {
</div>
<FormModal addVisible={addVisible} setGetAddVisible={setGetAddVisible} closAddModal={closAddModal} />
<EditModal editVisible={editVisible} editModal={editModal} yisaData={getEditData}/>
<EditModal editVisible={editVisible} editModal={editModal} yisaData={getEditData} />
<Modal
visible={deleteVisible}
onCancel={deleteModal}
@ -484,6 +589,72 @@ function ChargeRules(props) {
<button className="cancel colorReset" onClick={() => { cancel() }}>取消</button>
</div>
</Modal>
<Modal
visible={bindVisible}
onCancel={bindModal}
footer={null}
className="bindModal"
title='绑定规则'
>
<div className="yisa-search selectChange">
<label>请先选择要绑定的车辆类型</label>
<Select
style={{ width: 200, marginLeft: 14 }}
value={bindData.bindData}
options={sysConfig.vehicleTypeNOAll}
onChange={handleCarType}
placeholder="请选择"
/>
</div>
{
bindCarPark === 1 || 2 || 3 ?
<>
<div className="patkPay">
<div className="yisa-search">
<label>停车场计费类型</label>
<Select
style={{ width: 200, marginLeft: 14 }}
value={bindData.charge_type}
options={sysConfig.chargeType}
onChange={handleParkPay}
placeholder="请选择"
/>
</div>
<div className="yisa-search bind">
<label>父车场名称</label>
<Input
placeholder="请输入"
value={bindData.name}
style={{ width: 200, marginLeft: 14 }}
onChange={handleName}
/>
</div>
<div className="yisa-search bind">
<Button type="primary" className=" colorBtn" icon={<SearchOutlined />} onClick={() => { getBindData() }}>
查询
</Button>
</div>
</div>
{
getStatus == true ?
<div className="table-list">
<Table
className="bindTable"
rowSelection={rowSelection}
columns={columns()}
dataSource={getColumnList.data}
/>
<Button type="primary" onClick={start} disabled={!hasSelected} >
Reload
</Button>
</div> : ''
}
</>
: ''
}
</Modal>
</>
}

4
src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/index.scss

@ -48,7 +48,9 @@ $color-primary: var(--color-primary);
margin-top: 20px;
.yisa-btn {
margin-left: 20px;
width: 130px;
height: 36px;
border: none;
width: 150px;
}
.root_gfkk {
margin-left: 20px;

17
src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx

@ -406,6 +406,14 @@ function CallbackSuggestion(props) {
}
})
}
const exportData = () => {
let data = {
...formData
}
ajax.exportDataList(data).then(res => {
window.open(res.data.export_url)
})
}
const checkPic = () => {
setEvidenceVisible(true)
}
@ -485,7 +493,7 @@ function CallbackSuggestion(props) {
<label>最后信息时间</label>
<Space direction="vertical" size={12}>
<RangePicker
value={[moment(formData.start_time), moment(formData.end_time)]}
value={[moment(formData.start_time), moment(formData.end_time)]}
showTime={{
format: 'HH:mm:ss',
}}
@ -497,12 +505,15 @@ function CallbackSuggestion(props) {
</div>
<div className="timePicker ">
<div className="btnBox">
<Button type="primary" className="yisa-btn" icon={<SearchOutlined />} onClick={() => { getSearchData() }}>
<Button type="primary" className="yisa-btn colorBtn" icon={<SearchOutlined />} onClick={() => { getSearchData() }}>
搜索
</Button>
<Button type="primary" className="yisa-btn" icon={<DeleteOutlined />} onClick={() => { getResetData() }}>
<Button type="primary" className="yisa-btn colorReset" icon={<DeleteOutlined />} onClick={() => { getResetData() }}>
清空
</Button>
<Button type="primary" className="yisa-btn colorBtn" onClick={() => { exportData() }}>
导出
</Button>
</div>
</div>
</div>

11
src/services/OperationCenter/CustomerServieMgm/index.js

@ -64,6 +64,14 @@ const getconfigurationAdd = (params) => {
data: params,
});
};
//反馈建议-导出
const exportDataList = (params) => {
return ajax({
url: "/api/ope/service/export",
type: "post",
data: params,
});
};
export default{
getSignallList,
getConfData,
@ -72,5 +80,6 @@ export default{
getCheckSignlList,
getconfigurationList,
getconfigurationDelete,
getconfigurationAdd
getconfigurationAdd,
exportDataList
}

12
src/services/search.js

@ -660,7 +660,14 @@ const specialExport = (params) => {
data: params,
});
};
//业务管理-计费规则-绑定车场
const getRoadList=(params)=>{
return ajax({
url: "/api/bpm/bill/get_road_list",
type: "post",
data: params,
});
}
//业务管理-黑名单列表
const blackListData = (params) => {
return ajax({
@ -1145,5 +1152,6 @@ export default {
addChangeRules,
changeEditRule,
deleteChangeRules,
getDetailData
getDetailData,
getRoadList
}
Loading…
Cancel
Save