diff --git a/src/components/BadgeStatus/index.vue b/src/components/BadgeStatus/index.vue index 6929f8bb..403cbbe6 100644 --- a/src/components/BadgeStatus/index.vue +++ b/src/components/BadgeStatus/index.vue @@ -28,5 +28,4 @@ const props = defineProps({ */ statusNames: { type: Object }, }); - diff --git a/src/components/JUpload/index.vue b/src/components/JUpload/index.vue index 03ee6536..18def1a3 100644 --- a/src/components/JUpload/index.vue +++ b/src/components/JUpload/index.vue @@ -1,7 +1,7 @@ - +
diff --git a/src/components/Player/ScreenPlayer.vue b/src/components/Player/ScreenPlayer.vue index 1e8e38f4..cbff2af4 100644 --- a/src/components/Player/ScreenPlayer.vue +++ b/src/components/Player/ScreenPlayer.vue @@ -5,7 +5,7 @@
@@ -208,9 +208,7 @@ const formData = ref({ // 全屏元素 const fullscreenRef = ref(null); -const { isFullscreen, enter, exit, toggle } = useFullscreen( - fullscreenRef.value, -); +const { isFullscreen, enter, exit, toggle } = useFullscreen(fullscreenRef); /** * 刷新视频 diff --git a/src/components/Player/index.vue b/src/components/Player/index.vue index ef5d2bcf..b5d20225 100644 --- a/src/components/Player/index.vue +++ b/src/components/Player/index.vue @@ -30,7 +30,7 @@ const options = reactive({ muted: false, //静音 webFullScreen: false, speedRate: ['0.75', '1.0', '1.25', '1.5', '2.0'], //播放倍速 - autoPlay: true, //自动播放 + autoPlay: false, //自动播放 loop: false, //循环播放 mirror: false, //镜像画面 ligthOff: false, //关灯模式 diff --git a/src/components/index.ts b/src/components/index.ts index 3e8f4b57..fdbb2309 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -8,7 +8,7 @@ import CardBox from './CardBox/index.vue'; // import Search from './Search' import NormalUpload from './NormalUpload/index.vue' import FileFormat from './FileFormat/index.vue' -// import JUpload from './JUpload/index.vue' +import JProUpload from './JUpload/index.vue' import { BasicLayoutPage, BlankLayoutPage } from './Layout' import { PageContainer } from 'jetlinks-ui-components/es/components' import Ellipsis from './Ellipsis/index.vue' @@ -27,7 +27,7 @@ export default { // .component('Search', Search) .component('NormalUpload', NormalUpload) .component('FileFormat', FileFormat) - // .component('JUpload', JUpload) + .component('JProUpload', JProUpload) .component('BasicLayoutPage', BasicLayoutPage) .component('BlankLayoutPage', BlankLayoutPage) .component('PageContainer', PageContainer) diff --git a/src/views/device/Instance/Export/index.vue b/src/views/device/Instance/Export/index.vue index 9f49c011..1b422fde 100644 --- a/src/views/device/Instance/Export/index.vue +++ b/src/views/device/Instance/Export/index.vue @@ -1,5 +1,12 @@ \ No newline at end of file diff --git a/src/views/device/Instance/Import/index.vue b/src/views/device/Instance/Import/index.vue index 899cdb61..335ff68d 100644 --- a/src/views/device/Instance/Import/index.vue +++ b/src/views/device/Instance/Import/index.vue @@ -1,36 +1,35 @@ \ No newline at end of file diff --git a/src/views/device/Instance/Save/index.vue b/src/views/device/Instance/Save/index.vue index b49cd0ba..00bf127c 100644 --- a/src/views/device/Instance/Save/index.vue +++ b/src/views/device/Instance/Save/index.vue @@ -18,7 +18,7 @@ - + @@ -60,15 +60,14 @@ {{item.name}} @@ -105,16 +104,12 @@ const formRef = ref(); const modelRef = reactive({ productId: undefined, - id: '', + id: undefined, name: '', describe: '', photoUrl: getImage('/device/instance/device-card.png'), }); -const filterOption = (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0; -}; - const vailId = async (_: Record, value: string) => { if (!props?.data?.id && value) { const resp = await isExists(value); @@ -202,10 +197,15 @@ const handleCancel = () => { const handleSave = () => { formRef.value .validate() - .then(async () => { + .then(async (_data: any) => { loading.value = true; - const resp = await update(toRaw(modelRef)); - loading.value = false; + const obj = {...toRaw(modelRef), ..._data} + if(!obj.id){ + delete obj.id + } + const resp = await update(obj).finally(() => { + loading.value = false; + }) if (resp.status === 200) { message.success('操作成功!'); emit('save'); diff --git a/src/views/device/Instance/index.vue b/src/views/device/Instance/index.vue index d28d075d..5320be4e 100644 --- a/src/views/device/Instance/index.vue +++ b/src/views/device/Instance/index.vue @@ -229,7 +229,7 @@ - + >({}); @@ -696,4 +696,8 @@ const saveBtn = () => { const handleSearch = (_params: any) => { params.value = _params; }; + +const onRefresh = () => { + instanceRef.value?.reload(); +} diff --git a/src/views/device/Instance/typings.d.ts b/src/views/device/Instance/typings.d.ts index e00c9319..035c56f0 100644 --- a/src/views/device/Instance/typings.d.ts +++ b/src/views/device/Instance/typings.d.ts @@ -83,4 +83,17 @@ type InstanceModel = { params: Set; // 处理无限循环Card active?: string; // 当前编辑的Card selectedRows: Map; +} + +export interface ActionsType { + key: string; + text?: string; + disabled?: boolean; + permission?: boolean; + onClick?: (data: any) => void; + style?: CSSProperties; + tooltip?: TooltipProps; + popConfirm?: PopconfirmProps; + icon?: string; + children?: ActionsType[]; } \ No newline at end of file diff --git a/src/views/media/Cascade/Channel/BindChannel/index.vue b/src/views/media/Cascade/Channel/BindChannel/index.vue index 137a0b19..18145a37 100644 --- a/src/views/media/Cascade/Channel/BindChannel/index.vue +++ b/src/views/media/Cascade/Channel/BindChannel/index.vue @@ -10,7 +10,7 @@ @cancel="_vis = false" :confirmLoading="loading" > -