|
@@ -60,6 +60,7 @@
|
|
|
:placeholder="t('room.form.titleplaceHolder')"
|
|
|
:maxlength="15"
|
|
|
show-count
|
|
|
+ :disabled="isRoomEnd"
|
|
|
/>
|
|
|
</a-form-item>
|
|
|
<a-form-item :label="t('room.form.desc')" name="desc">
|
|
@@ -68,6 +69,7 @@
|
|
|
:placeholder="t('room.form.descplaceHolder')"
|
|
|
:maxlength="200"
|
|
|
show-count
|
|
|
+ :disabled="isRoomEnd"
|
|
|
/>
|
|
|
</a-form-item>
|
|
|
<h4>{{ t('room.form.host') }}</h4>
|
|
@@ -84,6 +86,7 @@
|
|
|
:placeholder="t('room.form.nicknameDesc')"
|
|
|
:maxlength="15"
|
|
|
show-count
|
|
|
+ :disabled="isRoomEnd"
|
|
|
/>
|
|
|
</a-form-item>
|
|
|
<h4>{{ t('room.form.selectScene') }}</h4>
|
|
@@ -95,6 +98,7 @@
|
|
|
>
|
|
|
</a-form-item>
|
|
|
<EditScenes
|
|
|
+ :class="{ disabled: isRoomEnd }"
|
|
|
:scenes="current.scenes"
|
|
|
@delete="deleteScene"
|
|
|
@insert="scene => current.scenes.push(scene)"
|
|
@@ -111,6 +115,7 @@
|
|
|
:show-time="{ format: 'HH:mm' }"
|
|
|
format="YYYY-MM-DD HH:mm:ss"
|
|
|
style="width: 80%"
|
|
|
+ :disabled="isRoomEnd"
|
|
|
v-model:value="current.useTimeList"
|
|
|
/>
|
|
|
</a-form-item>
|
|
@@ -128,6 +133,7 @@
|
|
|
separator="-"
|
|
|
:num-inputs="4"
|
|
|
:should-auto-focus="false"
|
|
|
+ :class="{ disabled: isRoomEnd }"
|
|
|
:is-input-num="true"
|
|
|
:conditionalClass="['one', 'two', 'three', 'four']"
|
|
|
:placeholder="['-', '-', '-', '-']"
|
|
@@ -138,17 +144,20 @@
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
ghost
|
|
|
+ :disabled="isRoomEnd"
|
|
|
@click="authvisible = true"
|
|
|
>
|
|
|
<template #icon><plus-outlined /></template>添加用户</a-button
|
|
|
>
|
|
|
|
|
|
- <a-button
|
|
|
+ <span
|
|
|
+ class="user-label"
|
|
|
style="margin-left: 5px"
|
|
|
v-for="lab in current.userObjList"
|
|
|
- size="small"
|
|
|
- >{{ lab.userName }}</a-button
|
|
|
>
|
|
|
+ {{ lab.userName }}
|
|
|
+ <CloseOutlined @click="handleAssistantUseDelete(lab.userName)" />
|
|
|
+ </span>
|
|
|
</a-form-item>
|
|
|
<a-form-item
|
|
|
label="设置房间人数"
|
|
@@ -162,6 +171,7 @@
|
|
|
placeholder="请输入房间人数"
|
|
|
:min="5"
|
|
|
:max="50"
|
|
|
+ :disabled="isRoomEnd"
|
|
|
style="width: 80%"
|
|
|
>
|
|
|
<template #addonBefore>
|
|
@@ -251,6 +261,7 @@ export default defineComponent({
|
|
|
})
|
|
|
const { getAntdLocale } = useLocale()
|
|
|
const roomStore = useRoomStore()
|
|
|
+ const isRoomEnd = computed(() => roomStore.roomStatus === 2)
|
|
|
const { getLocale } = useLocale()
|
|
|
const { t } = useI18n()
|
|
|
const returnLocale = computed(() => {
|
|
@@ -292,6 +303,10 @@ export default defineComponent({
|
|
|
} else {
|
|
|
current.takeLookLock = 1
|
|
|
}
|
|
|
+
|
|
|
+ if (current.visitPassword?.length === 0) {
|
|
|
+ current.takeLookLock = 0
|
|
|
+ }
|
|
|
current.cover = current.scenes[0].cover
|
|
|
console.log('save', current)
|
|
|
props.onSave && props.onSave(current)
|
|
@@ -335,6 +350,14 @@ export default defineComponent({
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ const handleAssistantUseDelete = (userName: string) => {
|
|
|
+ const users = current.userObjList || []
|
|
|
+ const index = users.findIndex(i => i.userName === userName)
|
|
|
+ if (index > -1) {
|
|
|
+ current.userObjList?.splice(index, 1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
return {
|
|
|
handleNickRegex,
|
|
|
returnLocale,
|
|
@@ -352,7 +375,9 @@ export default defineComponent({
|
|
|
otpInput,
|
|
|
authvisible,
|
|
|
handleAuthConfirm,
|
|
|
- authformState
|
|
|
+ authformState,
|
|
|
+ isRoomEnd,
|
|
|
+ handleAssistantUseDelete
|
|
|
// authTargetUser,
|
|
|
// authTargetUserTime
|
|
|
}
|
|
@@ -409,6 +434,16 @@ export default defineComponent({
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.disabled {
|
|
|
+ pointer-events: none;
|
|
|
+ cursor: not-allowed;
|
|
|
+ opacity: 0.5;
|
|
|
+}
|
|
|
+.user-label {
|
|
|
+ background: #eee;
|
|
|
+ padding: 5px 5px;
|
|
|
+ font-size: 13px;
|
|
|
+}
|
|
|
</style>
|
|
|
|
|
|
<style lang="scss">
|