|
|
@ -8,7 +8,7 @@ import { OrgItem } from '../../services/ktjTypes'; |
|
|
|
import {bleItem, child, GwdItem, orgCascaderType, systemItem} from './types'; |
|
|
|
import { sysSet } from '../../services/user/system'; |
|
|
|
import { useAppDispatch, useAppSelector } from "../../utils/hooks"; |
|
|
|
import { updateSystemAccountState, updateSystemOrgState } from '../../store/system/systemSlice'; |
|
|
|
import { updateSystemAccountState, updateSystemAllState, updateSystemOrgState } from '../../store/system/systemSlice'; |
|
|
|
import {createWebSocket, sharedWsUrl} from "../../services/socket"; |
|
|
|
import {start, stop, disconnect, connect} from "../../services/ble/ble"; |
|
|
|
|
|
|
@ -65,6 +65,8 @@ export default function Setting(){ |
|
|
|
value: cloneOrgItem.value |
|
|
|
} |
|
|
|
setOrgInfo(orgItem) |
|
|
|
let systemInfo = systemState.systemInfo |
|
|
|
setSystemList(systemInfo) |
|
|
|
} |
|
|
|
}, [systemState.orgInfo]) |
|
|
|
|
|
|
@ -255,8 +257,17 @@ export default function Setting(){ |
|
|
|
value |
|
|
|
} |
|
|
|
sysSet(params, "PUT").then(res=>{ |
|
|
|
if(res.status === 0){ |
|
|
|
const list:systemItem[] = JSON.parse(JSON.stringify(systemList)) |
|
|
|
list.forEach(el => { |
|
|
|
if(item.id === el.id){ |
|
|
|
el.value = value |
|
|
|
} |
|
|
|
}) |
|
|
|
dispatch(updateSystemAllState(list)) |
|
|
|
message.success("修改成功") |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
const form = () =>{ |
|
|
|