|
@@ -204,7 +204,11 @@
|
|
@on-change="handlePsOnChange"
|
|
@on-change="handlePsOnChange"
|
|
/>
|
|
/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
- <a-form-item name="scenes" style="margin-bottom: 2px">
|
|
|
|
|
|
+ <a-form-item
|
|
|
|
+ name="scenes"
|
|
|
|
+ style="margin-bottom: 2px"
|
|
|
|
+ class="add-user-list"
|
|
|
|
+ >
|
|
<div slot="label" style="margin: 10px 0">
|
|
<div slot="label" style="margin: 10px 0">
|
|
{{ t('room.authorize') }}
|
|
{{ t('room.authorize') }}
|
|
<InfoCircleOutlined
|
|
<InfoCircleOutlined
|
|
@@ -227,26 +231,28 @@
|
|
"
|
|
"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
- <a-button
|
|
|
|
- type="primary"
|
|
|
|
- size="small"
|
|
|
|
- ghost
|
|
|
|
- :disabled="isRoomEnd"
|
|
|
|
- @click="authvisible = true"
|
|
|
|
- >
|
|
|
|
- <template #icon><plus-outlined /></template
|
|
|
|
- >{{ t('room.addUser') }}</a-button
|
|
|
|
- >
|
|
|
|
-
|
|
|
|
- <span
|
|
|
|
- class="user-label"
|
|
|
|
- :class="{ disabled: isRoomEnd }"
|
|
|
|
- style="margin-left: 5px"
|
|
|
|
- v-for="lab in current.userObjList"
|
|
|
|
- >
|
|
|
|
- {{ lab.userName }}
|
|
|
|
- <CloseOutlined @click="handleAssistantUseDelete(lab.userName)" />
|
|
|
|
- </span>
|
|
|
|
|
|
+ <div class="user_list">
|
|
|
|
+ <a-button
|
|
|
|
+ type="primary"
|
|
|
|
+ size="small"
|
|
|
|
+ ghost
|
|
|
|
+ :disabled="isRoomEnd"
|
|
|
|
+ @click="authvisible = true"
|
|
|
|
+ >
|
|
|
|
+ <template #icon><plus-outlined /></template
|
|
|
|
+ >{{ t('room.addUser') }}</a-button
|
|
|
|
+ >
|
|
|
|
+ <span
|
|
|
|
+ class="user-label"
|
|
|
|
+ :class="{ disabled: isRoomEnd }"
|
|
|
|
+ v-for="lab in current.userObjList"
|
|
|
|
+ >
|
|
|
|
+ {{ lab.userName }}
|
|
|
|
+ <CloseOutlined
|
|
|
|
+ @click="handleAssistantUseDelete(lab.userName)"
|
|
|
|
+ />
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
<a-form-item
|
|
<a-form-item
|
|
:label="t('room.setRoomNumber')"
|
|
:label="t('room.setRoomNumber')"
|
|
@@ -278,7 +284,7 @@
|
|
@cancel="authformState.userName = ''"
|
|
@cancel="authformState.userName = ''"
|
|
@ok="handleAuthConfirm"
|
|
@ok="handleAuthConfirm"
|
|
>
|
|
>
|
|
- <a-form layout="inline" :model="authformState">
|
|
|
|
|
|
+ <a-form layout="inline" :model="authformState" ref="addFormRef">
|
|
<a-form-item
|
|
<a-form-item
|
|
:label="t('room.userAccount')"
|
|
:label="t('room.userAccount')"
|
|
name="userName"
|
|
name="userName"
|
|
@@ -318,7 +324,8 @@ import {
|
|
computed,
|
|
computed,
|
|
unref,
|
|
unref,
|
|
createVNode,
|
|
createVNode,
|
|
- shallowRef
|
|
|
|
|
|
+ shallowRef,
|
|
|
|
+ watch
|
|
} from 'vue'
|
|
} from 'vue'
|
|
|
|
|
|
import { createRoom, useRoomStore } from '@/store/modules/room'
|
|
import { createRoom, useRoomStore } from '@/store/modules/room'
|
|
@@ -414,12 +421,14 @@ export default defineComponent({
|
|
|
|
|
|
const otpInput = ref('')
|
|
const otpInput = ref('')
|
|
const formRef = ref<FormInstance>()
|
|
const formRef = ref<FormInstance>()
|
|
|
|
+ const addFormRef = ref<FormInstance>()
|
|
|
|
+
|
|
const current = reactive({
|
|
const current = reactive({
|
|
...createRoom(props.room || {})
|
|
...createRoom(props.room || {})
|
|
})
|
|
})
|
|
|
|
|
|
watchEffect(async () => {
|
|
watchEffect(async () => {
|
|
- if(typeof current.head === 'undefined'){
|
|
|
|
|
|
+ if (typeof current.head === 'undefined') {
|
|
current.head = ''
|
|
current.head = ''
|
|
}
|
|
}
|
|
if (current.useTimeList?.length) {
|
|
if (current.useTimeList?.length) {
|
|
@@ -443,9 +452,10 @@ export default defineComponent({
|
|
if (!current.userObjList) {
|
|
if (!current.userObjList) {
|
|
current.userObjList = []
|
|
current.userObjList = []
|
|
}
|
|
}
|
|
- if (!current.userObjList) {
|
|
|
|
- current.userObjList = []
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ // if (!current.userObjList) {
|
|
|
|
+ // current.userObjList = []
|
|
|
|
+ // }
|
|
|
|
|
|
const deleteScene = (scene: Scene) => {
|
|
const deleteScene = (scene: Scene) => {
|
|
const index = current.scenes.indexOf(scene)
|
|
const index = current.scenes.indexOf(scene)
|
|
@@ -677,6 +687,17 @@ export default defineComponent({
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
// initMap()
|
|
// initMap()
|
|
|
|
+ watch(
|
|
|
|
+ authvisible,
|
|
|
|
+ (newVal, oldVal) => {
|
|
|
|
+ if (oldVal && !newVal) {
|
|
|
|
+ clearForm()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ immediate: true
|
|
|
|
+ }
|
|
|
|
+ )
|
|
})
|
|
})
|
|
onBeforeUnmount(() => {
|
|
onBeforeUnmount(() => {
|
|
const editor = editorRef.value
|
|
const editor = editorRef.value
|
|
@@ -760,6 +781,11 @@ export default defineComponent({
|
|
const handlePsOnChange = (value: string) => {
|
|
const handlePsOnChange = (value: string) => {
|
|
console.log('OTP changed: ', value)
|
|
console.log('OTP changed: ', value)
|
|
}
|
|
}
|
|
|
|
+ const clearForm = () => {
|
|
|
|
+ if (addFormRef.value) {
|
|
|
|
+ addFormRef.value.clearValidate()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
return {
|
|
return {
|
|
isLive,
|
|
isLive,
|
|
@@ -800,7 +826,8 @@ export default defineComponent({
|
|
handleVideoSync,
|
|
handleVideoSync,
|
|
editorRef,
|
|
editorRef,
|
|
handleEditorCreated,
|
|
handleEditorCreated,
|
|
- handlePsOnChange
|
|
|
|
|
|
+ handlePsOnChange,
|
|
|
|
+ addFormRef
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -886,6 +913,14 @@ export default defineComponent({
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+.user_list {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ gap: 5px 10px;
|
|
|
|
+ width: 100%;
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
+ flex-direction: row;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|
|
|
|
|
|
<style lang="scss">
|
|
<style lang="scss">
|