|
@@ -16,6 +16,7 @@ import PermSelect from '@/pages/Customer/Company/components/PermSelect'
|
|
|
const Dashboard = () => {
|
|
const Dashboard = () => {
|
|
|
const timer = useRef(null)
|
|
const timer = useRef(null)
|
|
|
const [state, setState] = useState({
|
|
const [state, setState] = useState({
|
|
|
|
|
+ disabled: true,
|
|
|
loading: true,
|
|
loading: true,
|
|
|
staffIds: null,
|
|
staffIds: null,
|
|
|
immediate: false,
|
|
immediate: false,
|
|
@@ -44,9 +45,6 @@ const Dashboard = () => {
|
|
|
// 展示卡片详情
|
|
// 展示卡片详情
|
|
|
const handleRatioCard = dataType => {
|
|
const handleRatioCard = dataType => {
|
|
|
setModalProps({
|
|
setModalProps({
|
|
|
- zIndex: '1100',
|
|
|
|
|
- closable: true,
|
|
|
|
|
- onClose: () => toggleModal(),
|
|
|
|
|
width: '90vw',
|
|
width: '90vw',
|
|
|
modalRender: () => (
|
|
modalRender: () => (
|
|
|
<RatioPanels
|
|
<RatioPanels
|
|
@@ -54,12 +52,14 @@ const Dashboard = () => {
|
|
|
retioCyclical={state.params.cyclical}
|
|
retioCyclical={state.params.cyclical}
|
|
|
dataPermission={state.params.dataPermission}
|
|
dataPermission={state.params.dataPermission}
|
|
|
/>
|
|
/>
|
|
|
- )
|
|
|
|
|
|
|
+ ),
|
|
|
|
|
+ onCancel: () => toggleModal()
|
|
|
})
|
|
})
|
|
|
toggleModal()
|
|
toggleModal()
|
|
|
}
|
|
}
|
|
|
const initData = async payload => {
|
|
const initData = async payload => {
|
|
|
if (timer.current) clearTimeout(timer.current)
|
|
if (timer.current) clearTimeout(timer.current)
|
|
|
|
|
+ setState({ ...state, disabled: true })
|
|
|
const {
|
|
const {
|
|
|
code = -1,
|
|
code = -1,
|
|
|
data: {
|
|
data: {
|
|
@@ -88,6 +88,7 @@ const Dashboard = () => {
|
|
|
businessChainRatio,
|
|
businessChainRatio,
|
|
|
serviceLogChainRatio,
|
|
serviceLogChainRatio,
|
|
|
aggregation,
|
|
aggregation,
|
|
|
|
|
+ disabled: false,
|
|
|
businessChar
|
|
businessChar
|
|
|
})
|
|
})
|
|
|
return
|
|
return
|
|
@@ -104,6 +105,7 @@ const Dashboard = () => {
|
|
|
businessChainRatio,
|
|
businessChainRatio,
|
|
|
serviceLogChainRatio,
|
|
serviceLogChainRatio,
|
|
|
aggregation,
|
|
aggregation,
|
|
|
|
|
+ disabled: false,
|
|
|
businessChar
|
|
businessChar
|
|
|
})
|
|
})
|
|
|
}, 1000)
|
|
}, 1000)
|
|
@@ -225,18 +227,15 @@ const Dashboard = () => {
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
<div className="mt-4">
|
|
<div className="mt-4">
|
|
|
- <PermSelect loading={state.loading} onConfirm={handlePermChange} dataType="workbench" />
|
|
|
|
|
- {/* <Select
|
|
|
|
|
|
|
+ <PermSelect
|
|
|
loading={state.loading}
|
|
loading={state.loading}
|
|
|
- options={permData?.workbench || []}
|
|
|
|
|
- dropdownMatchSelectWidth={false}
|
|
|
|
|
- defaultValue="oneself"
|
|
|
|
|
- onChange={e =>
|
|
|
|
|
- setState({ ...state, immediate: true, params: { ...state.params, dataPermission: e } })
|
|
|
|
|
- }
|
|
|
|
|
- /> */}
|
|
|
|
|
|
|
+ disabled={state.disabled}
|
|
|
|
|
+ onConfirm={handlePermChange}
|
|
|
|
|
+ dataType="workbench"
|
|
|
|
|
+ />
|
|
|
<span className="ml-4">
|
|
<span className="ml-4">
|
|
|
<Select
|
|
<Select
|
|
|
|
|
+ disabled={state.disabled}
|
|
|
loading={state.loading}
|
|
loading={state.loading}
|
|
|
options={cyclicalOp}
|
|
options={cyclicalOp}
|
|
|
dropdownMatchSelectWidth={false}
|
|
dropdownMatchSelectWidth={false}
|