|
@@ -12,6 +12,9 @@
|
|
|
:columns="sceneColumns"
|
|
|
:pagination="pagination"
|
|
|
:row-selection="{
|
|
|
+ getCheckboxProps: (scene: Scene) => ({
|
|
|
+ disabled: scene.bind && !defaultTypeNums[params.type].some(num => scene.num === num)
|
|
|
+ }),
|
|
|
selectedRowKeys: typeNums[params.type],
|
|
|
onChange: changeSelectNums
|
|
|
}"
|
|
@@ -25,7 +28,7 @@ import { reactive } from 'vue'
|
|
|
import { fetchScenes, SceneType, SceneTypeDesc } from '@/api'
|
|
|
import { usePaging } from '@/hook'
|
|
|
|
|
|
-import type { SelectTypeScenes } from '@/store'
|
|
|
+import type { SelectTypeScenes, Scene } from '@/store'
|
|
|
|
|
|
defineOptions<{ name: 'select-scene-list' }>()
|
|
|
|
|
@@ -46,6 +49,7 @@ const tabOptions = [SceneType.SWKJ, SceneType.SWKK, SceneType.SWSS].map(
|
|
|
})
|
|
|
)
|
|
|
|
|
|
+const defaultTypeNums = { ...props.typeNums }
|
|
|
const params = reactive({ type: SceneType.SWSS })
|
|
|
const { list, pagination } = usePaging(fetchScenes, params)
|
|
|
|