|
@@ -1,5 +1,5 @@
|
|
|
import React, { useState } from 'react'
|
|
import React, { useState } from 'react'
|
|
|
-import { Tag, Select } from 'antd'
|
|
|
|
|
|
|
+import { Tag, Select, Tooltip, Input } from 'antd'
|
|
|
import ProTable from '@ant-design/pro-table'
|
|
import ProTable from '@ant-design/pro-table'
|
|
|
import consts from '@/consts'
|
|
import consts from '@/consts'
|
|
|
import { useModel } from 'umi'
|
|
import { useModel } from 'umi'
|
|
@@ -47,7 +47,6 @@ const LockStore = () => {
|
|
|
const [state, setState] = useState({
|
|
const [state, setState] = useState({
|
|
|
params: { dataPermission: 'oneself' },
|
|
params: { dataPermission: 'oneself' },
|
|
|
data: [],
|
|
data: [],
|
|
|
- total: 0,
|
|
|
|
|
id: ''
|
|
id: ''
|
|
|
})
|
|
})
|
|
|
const handleSearch = value => {
|
|
const handleSearch = value => {
|
|
@@ -180,7 +179,7 @@ const LockStore = () => {
|
|
|
onChange={e => {
|
|
onChange={e => {
|
|
|
setState({ ...state, params: { ...state.params, dataPermission: e } })
|
|
setState({ ...state, params: { ...state.params, dataPermission: e } })
|
|
|
}}
|
|
}}
|
|
|
- options={permData?.customer || []}
|
|
|
|
|
|
|
+ options={permData?.product || []}
|
|
|
/>
|
|
/>
|
|
|
}
|
|
}
|
|
|
bordered
|
|
bordered
|
|
@@ -203,11 +202,18 @@ const LockStore = () => {
|
|
|
}}
|
|
}}
|
|
|
scroll={getScrollRef}
|
|
scroll={getScrollRef}
|
|
|
toolbar={{
|
|
toolbar={{
|
|
|
- search: {
|
|
|
|
|
- allowClear: true,
|
|
|
|
|
- onSearch: handleSearch,
|
|
|
|
|
- placeholder: '输入软件锁号'
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ search: (
|
|
|
|
|
+ <Tooltip placement="bottom" title="输入软件锁号">
|
|
|
|
|
+ <Input.Search
|
|
|
|
|
+ style={{ width: '300px' }}
|
|
|
|
|
+ allowClear={true}
|
|
|
|
|
+ placeholder={`在${
|
|
|
|
|
+ permData?.product?.find(item => item.value === state.params.dataPermission)?.label
|
|
|
|
|
+ }下搜索`}
|
|
|
|
|
+ onSearch={handleSearch}
|
|
|
|
|
+ />
|
|
|
|
|
+ </Tooltip>
|
|
|
|
|
+ )
|
|
|
}}
|
|
}}
|
|
|
/>
|
|
/>
|
|
|
// {/* <Locks onClose={hideDrawer} visible={state.visible} onCreate={onCreate} id={state.id} /> */}
|
|
// {/* <Locks onClose={hideDrawer} visible={state.visible} onCreate={onCreate} id={state.id} /> */}
|