26 changed files with 1456 additions and 109 deletions
-
305src/assets/fonts/font_pda/demo_index.html
-
54src/assets/fonts/font_pda/iconfont.css
-
2src/assets/fonts/font_pda/iconfont.js
-
84src/assets/fonts/font_pda/iconfont.json
-
BINsrc/assets/fonts/font_pda/iconfont.ttf
-
BINsrc/assets/fonts/font_pda/iconfont.woff
-
BINsrc/assets/fonts/font_pda/iconfont.woff2
-
35src/pages/InRoadMgm/InRoadOverview/loadable.jsx
-
6src/pages/OperationCenter/AppMgm/MobileDeviceMgm/index.jsx
-
27src/pages/OperationCenter/AppMgm/MobileDeviceMgm/index.scss
-
61src/pages/OperationCenter/AppMgm/MobileDeviceMgm/loadable.jsx
-
101src/pages/OperationCenter/AppMgm/WechatMenuMgm/index.scss
-
356src/pages/OperationCenter/AppMgm/WechatMenuMgm/loadable.jsx
-
7src/pages/OperationCenter/AppMgm/index.jsx
-
15src/pages/OperationCenter/OperationSales/CouponMgm/CouponRules/loadable.jsx
-
35src/pages/OutRoadMgm/OutRoadOverview/loadable.jsx
-
25src/pages/SystemMgm/BusinessConfig/HotCbdConf/index.scss
-
242src/pages/SystemMgm/BusinessConfig/HotCbdConf/loadable.jsx
-
11src/pages/SystemMgm/BusinessConfig/PageConf/index.scss
-
6src/pages/SystemMgm/BusinessConfig/PageConf/loadable.jsx
-
7src/pages/SystemMgm/BusinessConfig/PdaArrearConf/loadable.jsx
-
93src/pages/SystemMgm/BusinessConfig/VacationConf/loadable.jsx
-
12src/router/router.config.js
-
43src/services/OperationCenter/AppMgm/index.js
-
4src/services/OperationCenter/index.js
-
14src/services/SystemMgm/BusinessConf/index.js
305
src/assets/fonts/font_pda/demo_index.html
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
54
src/assets/fonts/font_pda/iconfont.css
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
2
src/assets/fonts/font_pda/iconfont.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,6 @@ |
|||
import React from "react" |
|||
import loadable from "@loadable/component" |
|||
import { LoadingImg } from "@/components" |
|||
|
|||
const WechatMenuMgmLoadable = loadable(() => import("./loadable")) |
|||
export default (pros) => <WechatMenuMgmLoadable {...pros} fallback={<LoadingImg />} /> |
@ -0,0 +1,27 @@ |
|||
@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); |
|||
|
|||
.mobile-device-mgm{ |
|||
padding: 20px; |
|||
.content{ |
|||
width: 800px; |
|||
background-color: #4f5a6e; |
|||
border-radius: 10px; |
|||
padding: 20px; |
|||
} |
|||
.title{ |
|||
font-size: 18px; |
|||
font-weight: bold; |
|||
margin-bottom: 20px; |
|||
} |
|||
.row{ |
|||
display: flex; |
|||
margin-bottom: 20px; |
|||
} |
|||
.name{ |
|||
margin-right: 10px; |
|||
} |
|||
} |
@ -0,0 +1,61 @@ |
|||
import React, { useState, useRef, useEffect } from "react"; |
|||
import { message, Pagination, Table, Space, Modal,TextArea ,Input , Button } from "antd"; |
|||
import { dictionary, utils } from "@/config/common"; |
|||
// import moment from 'moment' |
|||
import { useSessionStorageState, useUpdateEffect, useSize, useUpdate } from 'ahooks'; |
|||
import ajax from "@/services" |
|||
import { FormInput, FormSelect, OptionPanel, ResultPanel, FormSliderPicker, AreaCascader, ImgResize, ImgZoom, } from "@/components" |
|||
import "./index.scss"; |
|||
// import errorImg from "@/assets/images/layout/error.png" |
|||
// import { useLocation } from "react-router-dom"; |
|||
function WechatMenuMgm() { |
|||
|
|||
const [resultData, setResultData] = useState({}) |
|||
|
|||
const getData = ()=>{ |
|||
ajax.getAboutUsInfo().then(res=>{ |
|||
if(res.status == 20000){ |
|||
setResultData(res.data) |
|||
}else{ |
|||
|
|||
} |
|||
}) |
|||
.catch(err=>{ |
|||
console.log(err) |
|||
}) |
|||
} |
|||
const editData = ()=>{ |
|||
ajax.editAboutUsInfo(resultData).then(res=>{ |
|||
if(res.status == 20000){ |
|||
message.success(res.message) |
|||
}else{ |
|||
message.error(res.message) |
|||
} |
|||
}) |
|||
.catch(err=>{ |
|||
console.log(err) |
|||
}) |
|||
} |
|||
|
|||
useEffect(()=>{ |
|||
getData() |
|||
}, []) |
|||
return <div className="mobile-device-mgm"> |
|||
<div className="content"> |
|||
<div className="title">青岛收费管理端APP</div> |
|||
<div className="row"> |
|||
<span className="name">关于我们</span> |
|||
<Input.TextArea value={resultData.description} onChange={(e)=>{setResultData({...resultData, description: e.target.value})}} rows={5} showCount={true} maxLength={300} style={{width: "600px"}}></Input.TextArea> |
|||
</div> |
|||
<div className="row"> |
|||
<span className="name">客服电话</span> |
|||
<Input value={resultData.tel} onChange={(e)=>{setResultData({...resultData, tel: e.target.value})}} style={{width: "600px"}}></Input> |
|||
</div> |
|||
<div> |
|||
<Button type="primary" onClick={editData}>保存</Button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
} |
|||
|
|||
export default WechatMenuMgm; |
@ -1,15 +1,353 @@ |
|||
import React, { useState, useRef, useEffect } from "react"; |
|||
// import { message, Pagination, Table, Space, Modal, } from "antd"; |
|||
// import { dictionary, utils } from "@/config/common"; |
|||
import { message, Space, Modal, Popover ,Button,Input ,Radio } from "antd"; |
|||
import { dictionary, utils } from "@/config/common"; |
|||
// import moment from 'moment' |
|||
// import { useSessionStorageState, useUpdateEffect, useSize, useUpdate } from 'ahooks'; |
|||
// import ajax from "@/services" |
|||
// import { FormInput, FormSelect, OptionPanel, ResultPanel, FormSliderPicker, AreaCascader, ImgResize, ImgZoom, } from "@/components" |
|||
// import "./index.scss"; |
|||
// import errorImg from "@/assets/images/layout/error.png" |
|||
// import { useLocation } from "react-router-dom"; |
|||
import { useSessionStorageState, useUpdateEffect, useSize, useUpdate } from 'ahooks'; |
|||
import ajax from "@/services" |
|||
import { FormInput, FormSelect, OptionPanel, ResultPanel, FormSliderPicker, AreaCascader, ImgResize, ImgZoom, } from "@/components" |
|||
import "./index.scss"; |
|||
import errorImg from "@/assets/images/layout/error.png" |
|||
import { useLocation } from "react-router-dom"; |
|||
import { IconPda } from '@/components' |
|||
import { ExclamationCircleOutlined} from '@ant-design/icons'; |
|||
|
|||
function WechatMenuMgm() { |
|||
return <div>WechatMenuMgm</div> |
|||
|
|||
const [configArray, setConfigArray] = useState([]) |
|||
const [rightData, setRightData] = useState({}) |
|||
const [activeMenuIndex, setActiveMenuIndex] = useState(-1) |
|||
const [activeSubmenuIndex, setActiveSubmenuIndex] = useState(-1) |
|||
const [isEdit, setIsEdit] = useState(false) |
|||
const getWechatMenuList = ()=>{ |
|||
ajax.getWechatMenuList().then(res=>{ |
|||
if(res.status == 20000){ |
|||
// console.log(res.data) |
|||
setConfigArray(res.data) |
|||
}else{ |
|||
|
|||
} |
|||
}) |
|||
.catch(err=>{ |
|||
console.log(err) |
|||
}) |
|||
} |
|||
|
|||
const choseOneMenu = (index, idx)=>{ |
|||
setActiveMenuIndex(index) |
|||
setActiveSubmenuIndex(idx) |
|||
let temp = configArray[index].children[idx] |
|||
setRightData(temp) |
|||
setIsEdit(true) |
|||
} |
|||
|
|||
|
|||
|
|||
const deleteMenu = ()=>{ |
|||
if(configArray[activeMenuIndex].children){ |
|||
Modal.confirm({ |
|||
title: '删除', |
|||
icon: <ExclamationCircleOutlined />, |
|||
content: '该菜单已配置子菜单,请确认是否删除?', |
|||
onOk() { |
|||
confirmDeleteMenu() |
|||
}, |
|||
onCancel() { |
|||
console.log('取消'); |
|||
}, |
|||
}); |
|||
}else{ |
|||
confirmDeleteMenu() |
|||
} |
|||
|
|||
} |
|||
|
|||
const confirmDeleteMenu = ()=>{ |
|||
let temp = [...configArray] |
|||
if(activeMenuIndex > -1){ |
|||
temp.splice(activeMenuIndex, 1) |
|||
setConfigArray(temp) |
|||
} |
|||
setActiveMenuIndex(-1) |
|||
setActiveSubmenuIndex(-1) |
|||
message.success('一级菜单删除成功') |
|||
} |
|||
|
|||
const deleteSubMenu = ()=>{ |
|||
let temp = [...configArray]; |
|||
let temp_children = [...temp[activeMenuIndex].children] |
|||
temp_children.splice(activeSubmenuIndex, 1) |
|||
temp[activeMenuIndex].children = temp_children |
|||
setConfigArray(temp) |
|||
setActiveMenuIndex(-1) |
|||
setActiveSubmenuIndex(-1) |
|||
message.success('子菜单删除成功') |
|||
} |
|||
|
|||
const clickMenu = (index)=>{ |
|||
setActiveMenuIndex(index) |
|||
setActiveSubmenuIndex(-1) |
|||
setRightData({ |
|||
name: configArray[index].name, |
|||
type: configArray[index].type, |
|||
url: configArray[index].url |
|||
}) |
|||
setIsEdit(true) |
|||
} |
|||
|
|||
const addOneMenu = (index)=>{ |
|||
// let temp = [...configArray] |
|||
// if(temp[index].children){ |
|||
// let tempchildren = [...temp[index].children] |
|||
// tempchildren.push({name: '子菜单' , type: 1, url: ""}) |
|||
// temp[index].children = tempchildren |
|||
// }else{ |
|||
// temp[index].children = [{name: '子菜单', type: 1, url: ""}] |
|||
// } |
|||
// setConfigArray(temp) |
|||
setRightData({name: '子菜单', type: 1, url: ""}) |
|||
setActiveMenuIndex(index) |
|||
if(configArray[index].children?.length){ |
|||
setActiveSubmenuIndex(configArray[index].children?.length) |
|||
}else{ |
|||
setActiveSubmenuIndex(0) |
|||
} |
|||
setIsEdit(false) |
|||
} |
|||
|
|||
const addFirstMenu = ()=>{ |
|||
setRightData({name: '一级菜单', type: 1, url: ""}) |
|||
if(configArray.length < 3){ |
|||
setActiveMenuIndex(configArray.length) |
|||
} |
|||
setActiveSubmenuIndex(-1) |
|||
setIsEdit(false) |
|||
} |
|||
|
|||
const onChange = (type, e)=>{ |
|||
let value = e.target.value, temp = {...rightData} |
|||
temp[type] = value |
|||
setRightData(temp) |
|||
// let temp_config = [...configArray] |
|||
// if(activeSubmenuIndex > -1 && activeMenuIndex > -1){ |
|||
// temp_config[activeMenuIndex].children[activeSubmenuIndex][type] = value |
|||
// }else{ |
|||
// temp_config[activeMenuIndex][type] = value |
|||
// } |
|||
// setConfigArray(temp_config) |
|||
} |
|||
|
|||
const publish = ()=>{ |
|||
ajax.publishMenu(configArray).then(res=>{ |
|||
if(res.status == 20000){ |
|||
message.success(res.message) |
|||
}else{ |
|||
message.error(res.message) |
|||
} |
|||
}) |
|||
.catch(err=>{ |
|||
console.log(err) |
|||
}) |
|||
} |
|||
|
|||
const save = ()=>{ |
|||
if(!/^[\u4e00-\u9fa5]{1,4}$/.test(rightData.name) && !/^[a-zA-Z]{1,8}$/.test(rightData.name) ){ |
|||
message.error('名称不符合规范, 请重新输入') |
|||
return |
|||
} |
|||
if(!rightData.url){ |
|||
message.error('网络地址不能为空') |
|||
return |
|||
} |
|||
if(activeMenuIndex > -1 && activeSubmenuIndex == -1){ |
|||
// 添加一级菜单 |
|||
// if(configArray.length){ |
|||
// let lastMenu = configArray[configArray.length - 1] |
|||
// if(lastMenu.children?.length){ //如果有子菜单, 不验证是否设置消息类型和网页地址, 但是要验证每个子菜单是否设置完整 |
|||
// let flag = true; |
|||
// for(let i = 0; i < lastMenu.children.length ;i++){ |
|||
// if(!lastMenu.children[i].url){ |
|||
// message.error('所有子菜单的网络地址不能为空') |
|||
// flag = false |
|||
// break |
|||
// } |
|||
// } |
|||
// if(!flag){ |
|||
// return |
|||
// } |
|||
// }else{ |
|||
// if(!/^[\u4e00-\u9fa5]{1,4}$/.test(lastMenu.name) && !/^[a-zA-Z]{1,8}$/.test(lastMenu.name) ){ |
|||
// message.error('上一个菜单的名称不符合规范, 请重新输入') |
|||
// return |
|||
// } |
|||
// if(!lastMenu.url){ |
|||
// message.error('请先设置上一个一级菜单的网络地址') |
|||
// return |
|||
// } |
|||
// } |
|||
// } |
|||
// let temp = [...configArray] |
|||
// temp.push({name: '一级菜单', type: 1, url: ""}) |
|||
// setConfigArray(temp) |
|||
// setActiveMenuIndex(configArray.length - 1) |
|||
// setRightData({name: '一级菜单', type: 1, url: ""}) |
|||
if(isEdit){ |
|||
let temp = [...configArray] |
|||
temp[activeMenuIndex].name = rightData.name |
|||
temp[activeMenuIndex].type = rightData.type |
|||
temp[activeMenuIndex].url = rightData.url |
|||
setConfigArray(temp) |
|||
message.success('一级菜单编辑成功') |
|||
}else{ |
|||
let temp = [...configArray] |
|||
temp.push(rightData) |
|||
setConfigArray(temp) |
|||
message.success('一级菜单添加成功') |
|||
setIsEdit(true) |
|||
} |
|||
}else{ |
|||
if(isEdit){ |
|||
let temp_arr = [...configArray]; |
|||
console.log(temp_arr[activeMenuIndex]) |
|||
// if(temp_arr[activeMenuIndex]?.children[activeSubmenuIndex]){ |
|||
// temp_arr[activeMenuIndex]?.children[activeSubmenuIndex] = rightData |
|||
// } |
|||
temp_arr[activeMenuIndex].children[activeSubmenuIndex] = rightData |
|||
setConfigArray(temp_arr) |
|||
message.success('子菜单编辑成功') |
|||
}else{ |
|||
let temp = [...configArray] |
|||
if(temp[activeMenuIndex].children){ |
|||
let tempchildren = [...temp[activeMenuIndex].children] |
|||
tempchildren.push(rightData) |
|||
temp[activeMenuIndex].children = tempchildren |
|||
}else{ |
|||
temp[activeMenuIndex].children = [rightData] |
|||
} |
|||
setConfigArray(temp) |
|||
message.success('子菜单添加成功') |
|||
setIsEdit(true) |
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
useEffect(()=>{ |
|||
getWechatMenuList() |
|||
}, []) |
|||
return <div className="wechat-menu-mgm"> |
|||
<div className="left-wrapper"> |
|||
<div className="left-inner"> |
|||
<div className="top"> |
|||
<div style={{color: '#000'}}>12:00</div> |
|||
<div style={{color: '#000',textAlign: 'right',fontSize: '20px',marginRight: '20px'}}> |
|||
<IconPda type="xinhao01" ></IconPda>  |
|||
<IconPda type="wifi"></IconPda>  |
|||
<IconPda type="dianliang"></IconPda> |
|||
</div> |
|||
</div> |
|||
<div className="bottom"> |
|||
<div style={{fontSize: '24px',width: '40px',textAlign:"center",color: "#fff"}}> |
|||
<IconPda type="jianpan1"></IconPda> |
|||
</div> |
|||
{ |
|||
configArray.map((item,index)=>{ |
|||
return ( |
|||
<Popover placement="top" overlayClassName="wechat-config-popover" |
|||
content={ |
|||
<> |
|||
{ |
|||
item.children && item.children.map((one,idx)=>{ |
|||
return <div className="wechat-sub-menu" key={idx} onClick={()=>{choseOneMenu(index, idx)}}>{one.name}</div> |
|||
}) |
|||
} |
|||
{ |
|||
!item.children || item.children.length < 5 ? |
|||
<div onClick={()=>{addOneMenu(index)}} className="add-btn"> + 添加</div> |
|||
|
|||
: null |
|||
} |
|||
</> |
|||
} trigger="hover"> |
|||
<div key={index} className={`menu-name ${activeMenuIndex == index ? 'active' : ''}`} onClick={()=>{clickMenu(index)}}>{item.name}</div> |
|||
</Popover> |
|||
) |
|||
|
|||
}) |
|||
} |
|||
{ |
|||
configArray.length < 3 ? |
|||
<div onClick={addFirstMenu} className="add-btn">+添加</div> |
|||
:null |
|||
} |
|||
</div> |
|||
</div> |
|||
|
|||
{ |
|||
activeMenuIndex > -1 ? <div onClick={deleteMenu} className="delete-btn-wrapper"><IconPda type="shanchu1"></IconPda></div> : null |
|||
} |
|||
|
|||
</div> |
|||
<div className="right-wrapper"> |
|||
{ |
|||
activeMenuIndex > -1 ? |
|||
<div className="content"> |
|||
{ |
|||
activeSubmenuIndex > -1 && activeMenuIndex > -1 ? <div className="big-title">{configArray[activeMenuIndex]?.name}</div> : <div className="big-title">菜单信息</div> |
|||
} |
|||
|
|||
<div className="content-row"> |
|||
{ |
|||
activeSubmenuIndex > -1 ? |
|||
<span>子菜单名称</span>: |
|||
<span>名称   </span> |
|||
} |
|||
|
|||
<Input style={{width: '400px',marginLeft:"10px"}} value={rightData.name} onChange={(e)=>{onChange('name',e)}}></Input> |
|||
</div> |
|||
<div className=" desc"> |
|||
仅支持中英文和数字, 字数不超过4个汉字或8个字母 |
|||
</div> |
|||
<div className="content-row"> |
|||
{ |
|||
activeSubmenuIndex > -1 ? |
|||
<span>子菜单内容</span>: |
|||
<span>消息类型 </span> |
|||
} |
|||
|
|||
<Radio.Group style={{marginLeft:"10px"}} onChange={(e)=>{onChange("type",e)}} value={rightData.type}> |
|||
<Radio value={1}>跳转网页</Radio> |
|||
<Radio value={2}>跳转小程序</Radio> |
|||
</Radio.Group> |
|||
|
|||
</div> |
|||
<div className="content-row"> |
|||
<span>网页地址 </span> |
|||
<Input style={{width: '400px',marginLeft:"10px"}} value={rightData.url} onChange={(e)=>{onChange("url",e)}}></Input> |
|||
</div> |
|||
|
|||
</div> : null |
|||
} |
|||
|
|||
<div className="btn-wrapper"> |
|||
{ |
|||
activeMenuIndex > -1 ? |
|||
<> |
|||
{ |
|||
activeSubmenuIndex > -1 ? |
|||
<Button type="default" onClick={deleteSubMenu}>删除子菜单</Button> |
|||
: |
|||
<Button type="default" onClick={deleteMenu}>删除菜单</Button> |
|||
} |
|||
 <Button type="primary" onClick={save}>保存</Button>  |
|||
</> : null |
|||
} |
|||
|
|||
<Button type="primary" onClick={publish}>发布</Button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
} |
|||
|
|||
export default WechatMenuMgm; |
@ -0,0 +1,7 @@ |
|||
import WechatMenuMgm from "./WechatMenuMgm" |
|||
import MobileDeviceMgm from "./MobileDeviceMgm" |
|||
|
|||
export default { |
|||
WechatMenuMgm, |
|||
MobileDeviceMgm |
|||
} |
@ -0,0 +1,43 @@ |
|||
import ajax from "@/config/ajax" |
|||
|
|||
//公众号菜单配置-获取菜单
|
|||
const getWechatMenuList = (params) => { |
|||
return ajax({ |
|||
url: "/api/ope/app_manage/get_menu_list", |
|||
type: "post", |
|||
data: params, |
|||
}); |
|||
}; |
|||
// 公众号菜单配置-发布菜单
|
|||
|
|||
const publishMenu = (params) => { |
|||
return ajax({ |
|||
url: "/api/ope/app_manage/publish_menu", |
|||
type: "post", |
|||
data: params, |
|||
}); |
|||
}; |
|||
// 移动端管理配置 获取移动端管理数据
|
|||
const getAboutUsInfo = (params) => { |
|||
return ajax({ |
|||
url: "/api/ope/app_manage/get_about_us_info", |
|||
type: "post", |
|||
data: params, |
|||
}); |
|||
}; |
|||
|
|||
// 移动端管理配置 编辑保存移动端管理数据
|
|||
const editAboutUsInfo = (params) => { |
|||
return ajax({ |
|||
url: "/api/ope/app_manage/edit_about_us_info", |
|||
type: "post", |
|||
data: params, |
|||
}); |
|||
}; |
|||
|
|||
export default{ |
|||
getWechatMenuList, |
|||
publishMenu, |
|||
getAboutUsInfo, |
|||
editAboutUsInfo |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue