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
733f013867
  1. 9
      src/pages/SystemMgm/MessageMgm/ConfMes/loadable.jsx
  2. 9
      src/pages/SystemMgm/MessageMgm/DeviceAlarmMes/loadable.jsx
  3. 9
      src/pages/SystemMgm/MessageMgm/MonitorCarAlarmMes/loadable.jsx
  4. 9
      src/pages/SystemMgm/MessageMgm/NotificationMes/loadable.jsx
  5. 43
      src/pages/SystemMgm/RoleMgm/loadable.jsx

9
src/pages/SystemMgm/MessageMgm/ConfMes/loadable.jsx

@ -144,9 +144,9 @@ function ConfMes(props) {
end_time: v.endDateTime end_time: v.endDateTime
}) })
} }
const ajaxGetListData = () => {
const ajaxGetListData = (_pageInfo=pageInfo) => {
setLoading(true) setLoading(true)
ajax.getMsgConfList({...formData, ...pageInfo}).then(res => {
ajax.getMsgConfList({...formData, ..._pageInfo}).then(res => {
if (res.status == 20000) { if (res.status == 20000) {
setResultDate({ setResultDate({
list: res.data.list, list: res.data.list,
@ -285,7 +285,10 @@ function ConfMes(props) {
} }
const handleSearch = () => { const handleSearch = () => {
// ajaxGetListData()
ajaxGetListData({
...pageInfo,
pn: 1
})
setPageInfo({ setPageInfo({
...pageInfo, ...pageInfo,
pn: 1 pn: 1

9
src/pages/SystemMgm/MessageMgm/DeviceAlarmMes/loadable.jsx

@ -118,9 +118,9 @@ function NotificationMes(props) {
} }
const ajaxGetListData = () => {
const ajaxGetListData = (_pageInfo=pageInfo) => {
setLoading(true) setLoading(true)
ajax.getDeviceAlarmList({...formData, ...pageInfo}).then(res => {
ajax.getDeviceAlarmList({...formData, ..._pageInfo}).then(res => {
if (res.status == 20000) { if (res.status == 20000) {
setResultDate({ setResultDate({
list: res.data.list, list: res.data.list,
@ -206,7 +206,10 @@ function NotificationMes(props) {
} }
const handleSearch = () => { const handleSearch = () => {
// ajaxGetListData()
ajaxGetListData({
...pageInfo,
pn: 1
})
setPageInfo({ setPageInfo({
...pageInfo, ...pageInfo,
pn: 1 pn: 1

9
src/pages/SystemMgm/MessageMgm/MonitorCarAlarmMes/loadable.jsx

@ -117,9 +117,9 @@ function MonitorCarAlarmMes(props) {
} }
const ajaxGetListData = () => {
const ajaxGetListData = (_pageInfo=pageInfo) => {
setLoading(true) setLoading(true)
ajax.getCarAlarmList({...formData, ...pageInfo}).then(res => {
ajax.getCarAlarmList({...formData, ..._pageInfo}).then(res => {
if (res.status == 20000) { if (res.status == 20000) {
setResultDate({ setResultDate({
list: res.data.list, list: res.data.list,
@ -204,7 +204,10 @@ function MonitorCarAlarmMes(props) {
} }
const handleSearch = () => { const handleSearch = () => {
// ajaxGetListData()
ajaxGetListData({
...pageInfo,
pn: 1
})
setPageInfo({ setPageInfo({
...pageInfo, ...pageInfo,
pn: 1 pn: 1

9
src/pages/SystemMgm/MessageMgm/NotificationMes/loadable.jsx

@ -186,9 +186,9 @@ function NotificationMes(props) {
}) })
} }
const ajaxGetListData = () => {
const ajaxGetListData = (_pageInfo=pageInfo) => {
setLoading(true) setLoading(true)
ajax.getNotificationList({...formData, ...pageInfo}).then(res => {
ajax.getNotificationList({...formData, ..._pageInfo}).then(res => {
if (res.status == 20000) { if (res.status == 20000) {
setResultDate({ setResultDate({
list: res.data.list, list: res.data.list,
@ -316,7 +316,10 @@ function NotificationMes(props) {
} }
const handleSearch = () => { const handleSearch = () => {
// ajaxGetListData()
ajaxGetListData({
...pageInfo,
pn: 1
})
setPageInfo({ setPageInfo({
...pageInfo, ...pageInfo,
pn: 1 pn: 1

43
src/pages/SystemMgm/RoleMgm/loadable.jsx

@ -135,7 +135,7 @@ function RoleMgm(props) {
console.log(arr); console.log(arr);
setGetCheckVlue(true) setGetCheckVlue(true)
// getCheckValue // getCheckValue
setGetImg({ ...getImg, auth: string })
setGetAdminId({ ...getAdminId, auth: string })
} else { } else {
setCheckedKeys([]) setCheckedKeys([])
} }
@ -277,13 +277,18 @@ function RoleMgm(props) {
} }
}] }]
// //
const [getImg, setGetImg] = useState({
// const [getAdminId, setGetAdminId] = useState({
// remark: '',
// name: '',
// depart_id: '',
// auth: ''
// })
const [getAdminId, setGetAdminId] = useState({
remark: '', remark: '',
name: '', name: '',
depart_id: '', depart_id: '',
auth: '' auth: ''
}) })
const [getAdminId, setGetAdminId] = useState({})
const [getAuthId, setGetAuthId] = useState({}) const [getAuthId, setGetAuthId] = useState({})
// //
const CheckApplyBtn = (record) => { const CheckApplyBtn = (record) => {
@ -305,8 +310,8 @@ function RoleMgm(props) {
let strArr = str.split(","); let strArr = str.split(",");
let num = strArr.map(Number) let num = strArr.map(Number)
setCheckedKeys(num) setCheckedKeys(num)
let newArr = record.depart_arr.split(',')
// setGetImg(Object.assign({}, getImg, {
// let newArr = record.depart_arr.split(',')
// setGetAdminId(Object.assign({}, getAdminId, {
// name: record.name, // name: record.name,
// remark: record.remark, // remark: record.remark,
// depart_id: newArr // depart_id: newArr
@ -316,7 +321,7 @@ function RoleMgm(props) {
} }
} }
console.log(getImg);
console.log(getAdminId);
// //
const [getPlateColor, setGetPlateColor] = useState([]) const [getPlateColor, setGetPlateColor] = useState([])
const plateColor = () => { const plateColor = () => {
@ -452,20 +457,20 @@ function RoleMgm(props) {
const placeEditBtn = () => { const placeEditBtn = () => {
let arr = checkedKeys let arr = checkedKeys
let str = arr.toString() let str = arr.toString()
let arrStr = getImg.depart_id
let arrStr = getAdminId.depart_id
let lastElement = arrStr[arrStr.length - 1]; let lastElement = arrStr[arrStr.length - 1];
let data = { let data = {
...getImg,
...getAdminId,
auth: str, auth: str,
id: getAdminId.id, id: getAdminId.id,
depart_id: lastElement, depart_id: lastElement,
depart_arr: arrStr.toString() depart_arr: arrStr.toString()
} }
if (getImg.name == "") {
if (getAdminId.name == "") {
message.error('角色名称不能为空') message.error('角色名称不能为空')
return return
} else if (getImg.depart_id == "") {
} else if (getAdminId.depart_id == "") {
message.error('请选择所属部门') message.error('请选择所属部门')
return return
} }
@ -476,7 +481,7 @@ function RoleMgm(props) {
getData(formData) getData(formData)
setGetGovernment(0) setGetGovernment(0)
setGetAuthId({}) setGetAuthId({})
setGetImg({
setGetAdminId({
remark: '', remark: '',
name: '', name: '',
depart_id: '', depart_id: '',
@ -724,8 +729,8 @@ function RoleMgm(props) {
value={getAdminId.name} value={getAdminId.name}
style={{ width: 260, marginLeft: 50 }} style={{ width: 260, marginLeft: 50 }}
onChange={(v) => { onChange={(v) => {
setGetImg(
Object.assign({}, getImg, { name: v.target.value })
setGetAdminId(
Object.assign({}, getAdminId, { name: v.target.value })
); );
}} }}
/> />
@ -737,8 +742,8 @@ function RoleMgm(props) {
value={getAdminId.remark} value={getAdminId.remark}
style={{ width: 260, marginLeft: 78 }} style={{ width: 260, marginLeft: 78 }}
onChange={(v) => { onChange={(v) => {
setGetImg(
Object.assign({}, getImg, { remark: v.target.value })
setGetAdminId(
Object.assign({}, getAdminId, { remark: v.target.value })
); );
}} }}
/> />
@ -753,8 +758,8 @@ function RoleMgm(props) {
options={getPlateColor} options={getPlateColor}
changeOnSelect changeOnSelect
onChange={(v) => { onChange={(v) => {
setGetImg(
Object.assign({}, getImg, { depart_id: v })
setGetAdminId(
Object.assign({}, getAdminId, { depart_id: v })
); );
setGetAuthId({}) setGetAuthId({})
let arrStr = v let arrStr = v
@ -776,8 +781,8 @@ function RoleMgm(props) {
style={{ width: 260, marginLeft: 14 }} style={{ width: 260, marginLeft: 14 }}
defaultSelectedKeys={checkedKeys} defaultSelectedKeys={checkedKeys}
onCheck={(checkedKeysValue, info) => { onCheck={(checkedKeysValue, info) => {
setGetImg(
Object.assign({}, getImg, { auth: checkedKeysValue })
setGetAdminId(
Object.assign({}, getAdminId, { auth: checkedKeysValue })
); );
setCheckedKeys(checkedKeysValue) setCheckedKeys(checkedKeysValue)
}} }}

Loading…
Cancel
Save